Hi Timothy,


On Tue, Nov 19, 2013 at 8:33 AM, gettimothy <gettimothy@zoho.com> wrote:
Part 4 of the Blue Book--chapter 26 The implementation--in the intro there is this example:



center
  ^ origin + corner / 2


With these operations


Rectangle center
  0       push the value of the receiver's first instance variable (origin) onto the
          stack
   1       push the value of the receiver's second instance variable (corner) onto the
          stack
  176     send a binary message with the selector +
  119     push the Smalllnteger 2 onto the stack
  185     send a binary message with the selector /
  124     return the object on top of the stack as the value of the message (center)

In a Workspace, when I doit on 3 + 7/2 I get 5, left, right, unary, binary....rules apply.

What I see here--and please check my reasoning--is a RPN that places things onto the stack via Smalltalk's order of operation rules and then does conventional RPN processing.

In other words, Smalltalk expressions are translated to RPN and then placed on the stack.

Yes, and so they are in most stack-based implementations of languages.  Bytecode for a stack machine is a form of RPN.

A simple 'banish the thought' or 'yep' or 'sometimes'  would be helpful as I move forward in my study.  I am just trying to avoid carrying forward an improper idea that I will have to revise later when/if the facts turn out otherwise.

thx.

t

--
best,
Eliot