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

> I want to be able to define `plus` on my datatypes and I want to be able to define `+` on my datatypes.

So, I take it we agree that expressing the quadratic formula for BigDecimals as "x.pow(2).multiply(2).plus(x.multiply(3)).minus(5)" is awkward.

Do you think that "x.^(2).(2).+(x.(3)).-(5)" is any better? Because if you were hoping to support "x^2 * 2 + (x * 3) - 5" then you'll need more than just allowing non-alphabetic characters in names... you will ALSO need special support for infix notation (which Java lacks today).



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

Search: