Hacker News new | past | comments | ask | show | jobs | submit login

>"You have to have real good taste"

Gross exaggeration. Just a bit of plain common sense. Do override operators to perform matrix ops. Do not override + operator to do multiplication instead. And do not subtract apples from cars.

As for your further example as I said give shitty programmer code in any language and they will manage to fuck it up.




I think you and the parent are saying basically the same thing. I've been working in Scala for the past 10ish years and we have definitely gone through the "hype cycle" of operator overloading. Early Scala libs went a little nuts with creating an incredible array of symbolic operators (most famously this atrocity http://www.flotsam.nl/dispatch-periodic-table.html). We collectively realized that this was overboard and now Scala libraries typically provide a more modest set of symbolic operators (and generally the symbolic operators are just aliases for named methods so you can decide which ones you want to use in any particular codebase).

I would also disagree with the characterization as shitty code. The operators are actually really nice if you manage to learn them all well. It can make the code both very concise and readable. But it optimized for people who know the libraries extremely well over people who don't, which usually is not a great tradeoff for widely used libraries.


>"The operators are actually really nice if you manage to learn them all well. It can make the code both very concise and readable."

This sounds suspiciously regex like. Concise it is, readable it is not. But regex is unique case and and harassing people with similar patterns in every line of code should be punishable by at least 10 years of maintaining complex software written in Brainfuck.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: