News for hackers. Stuff that matters.
Re:Go at SoundCloud by dschobel on Tuesday July 24, 2012 @11:52PM (#4289279)
Doesn't ruby with its "operators are actually methods and fair-game for redefinition" implementation disprove the theory operator overloading is an a priori Bad Idea (tm)?

Those guys seem to manage the flexibility pretty well.

Re:Go at SoundCloud by mnutt on Wednesday July 25, 2012 @12:53AM (#4289418)
In my experience, ruby's '+' doesn't get redefined all that often. The most-redefined operators I've seen are '[]' and '<<'.

I think it works because people don't usually just go around wantonly pushing objects onto each other. It's usually part of a DSL that's used deliberately. Some of the craziest I've seen were things like _why's Hpricot library, which made a sort of xpath-like DSL:

    doc / :div / ".foo"
If I saw it out of context I'd assume it was some sort of pseudocode.