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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"
  • Comment on Re^5: What are the drawbacks of autobox?

Replies are listed 'Best First'.
Re^6: What are the drawbacks of autobox?
by chromatic (Archbishop) on Mar 01, 2010 at 18:17 UTC
    Indeed, there are many programming books that advocate that precedence should be ignored and all compound expressions should be fully bracketed.

    Keep holding on to that false dilemma; I'm sure that Lisp will succeed any day now when the unwashed masses realize that fully-parenthesized homoiconicity is the the One True Syntax form.

      Keep holding on to that false dilemma;

      Bad call. I didn't say I ascribed to that notion, only that it was prevalent.

      And that precedence has no bearing upon the utility of infix operators.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.