3 ms·
re: operator precedence Io uses Operator Shuffling to move those operator method calls back into normal mathematical expectation (or to be exact... C precedenc
by draegtun 13y ago
re: operator precedence
Io uses Operator Shuffling to move those operator method calls back into normal mathematical expectation (or to be exact... C precedence order) prior to building the AST. Ruby's parser must do (or does) something similar. From lmm answer it sounds like Scala does something similar to Ruby here.
Smalltalk, Self & Rebol have no operator precedence and simply interpret the operators from left to right (using parenthesis to enforce higher precedence).
Some refs:
- http://iolanguage.org/scm/io/docs/IoGuide.html#Syntax-Operators http://iolanguage.org/scm/io/docs/IoGuide.html#Syntax-Operat...
- http://stackoverflow.com/a/2926639/12195 http://stackoverflow.com/a/2926639/12195
- http://www.rebol.com/docs/core23/rebolcore-11.html http://www.rebol.com/docs/core23/rebolcore-11.html