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

It's not uncommon to use + for groups even if they're not abelian, esp. with near-rings.

This takes all its importance with duck-typing, as syntactic sugar of binary operators will be translated to a method call, e.g in Ruby a + b becomes a.+(b) [0]. while in Python it's a.__add__(b) [1]. The result might be commutative, but the call and evaluation order certainly is not.

[0] http://ruby-doc.org/core-1.9.3/Fixnum.html#method-i-2B [1] http://docs.python.org/reference/datamodel.html#object.__add...



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

Search: