2+2x2 I can see (Smalltalk has strict left-to-right evaluation of operators, so it parses as (2+2)x2), but for 2x2+2 to give the "wrong" would require `+` to have a higher precedence than `*`, something I've yet to see (short of abusing haskell to redefine the operators with fucked up precedences)
edit: god fucking dammit HN can't you get any markup right?
My point exactly. Had I had to do something in Smalltalk and not known that, that would have been a fun bug to find had I decided to be frisky and write it as 2+2*2.
2+2x2 I can see (Smalltalk has strict left-to-right evaluation of operators, so it parses as (2+2)x2), but for 2x2+2 to give the "wrong" would require `+` to have a higher precedence than `*`, something I've yet to see (short of abusing haskell to redefine the operators with fucked up precedences)
edit: god fucking dammit HN can't you get any markup right?