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

> Take a look and see. What do you think this BigInteger math does?

The problem for me is it's not clear if a.add(b) is "a+b" or "a+=b". With the regular operators it's always obvious which mutate the value and which return a new value, whereas the methods can do whatever they want. Yes, the operator is a method call and can do anything, but in practice everyone makes them do the obvious thing and follows the convention. There is no convention that "add" should return a new value - it's a verb, verbs usually mutate the object.



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

Search: