On Thu, Dec 27, 2012 at 1:04 PM, Joseph J Alotta <joseph.alotta@gmail.com> wrote:
1. If a message does not return self, then you wouldn't be able to chain messages
together or to cascade messages.

for example:

|s|

s := Sphere new.

s rotateLeft; rotateRight; spin 60.

would have to be:

s rotateLeft.
s rotateRight.
s spin 60.

Cascading using semicolons would still work if methods didn't answer self, but would be less useful in some circumstances.

The cascade rule is that subsequent messages get sent to the same receiver as the most recent one, so in

  s
    rotateLeft;
    rotateRight;
    spin: 60

all of the messages get sent to s - no matter what they return.

But here's where it's useful for simple modifier messages like these to answer self: say we had

  s := Sphere new
    rotateLeft;
    rotateRight;
    spin: 60.

Here the last three messages get sent to the result of (Sphere new). The result of the the entire cascade is the result of the last message sent, spin:. Since spin: answers self, we can do the Sphere creation and setup all in one cascade. Otherwise we'd have to split it:

  "If spin: didn't answer self"
  s := Sphere new.
  s
    rotateLeft;
    rotateRight;
    spin: 60.

Ben