in reply to Re^4: What are the drawbacks of autobox?
in thread What are the drawbacks of autobox?
I'm not sure anyone who's ever used Smalltalk would use the phrase "normal math infix operators", as Smalltalk has no operator precedence, not even for "normal math infix operators".
Well, it has been a long time, but I think you are more confused than I am. Precedence, (or a lack thereof), does not preclude the use of normal math infix operators. (Or as they call them "the usual binary arithmetic operators".)
And if you look at the best example I turned up in a quick peruse of my 20 y/o SmallTalk V/PM manual, you'll see ^self fromSeconds:((( hours*60 ) + minutes ) * 60 ) + seconds doesn't look any different to the way many people would code the same thing in a language that supports precedence. Contrast that with the same expression in languages that use reverse polish notation, or postfix method syntax.
Indeed, there are many programming books that advocate that precedence should be ignored and all compound expressions should be fully bracketed. This for the clarity and simplicity it gives the programmer. Not the computer parser.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: What are the drawbacks of autobox?
by chromatic (Archbishop) on Mar 01, 2010 at 18:17 UTC | |
by BrowserUk (Patriarch) on Mar 01, 2010 at 18:34 UTC |