2014-06-26 13:11 GMT-03:00 Richard Sargent <[email protected]>: > Esteban A. Maringolo wrote >> If one thing confuses people in that realm is non arithmetic precedence: >> Eg. 2 + 3 * 4 = 20 instead of the "expected" 14. >> >> And we're not going to change that either. It's not worthy, and I >> doubt if it is possible at all. > > I'm probably late to the party with this reply. The primary reason for not > changing this is that it would be incorrect. It comes down to intrinsic > versus extrinsic meaning. A multiple operator has an intrinsic meaning: it > means multiple. But a message name does not have intrinsic meaning (other > than it is a good idea to have the name represent what it does). The meaning > of a message is determined by the receiver. e.g. if PetitParser defines #* > to mean "0 or more repetitions", what happens when someone has decided that > it should be evaluated before #+?
That's exactly why I said it is not worth it. When the expression is with numeric literals is one thing, as soon as you're using variables it is something different. What I meant is changing #~= is as fanciful as doing that. > Message sending precedence can only be defined in terms of the type of > message: unary, binary (or infix), and keyword, since the interpretation of > the message is the receiver's responsibility, not the compiler's. That's why I said I doubt if it is feasible. Esteban A. Maringolo
