Re:Ask HN: What is -2^2?
by phaedrus on Saturday April 02, 2011 @01:59PM
(#2400511)
Somewhat related, in the Io language, I was surprised to find that the expression "-23 abs" evaluates to "-23" not +23. The language desugars the expression to "0-(23 abs)". I think what threw me was the fact that Io uses a space rather than a dot for member selectors. No one would be surprised that C++ evaluates "-numObj.abs()" that way.
[ Parent
| on HN ]
There are no comments on this comment yet.