Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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

Search: