From: John Gabriele Date: 2006-10-14T00:00:42+09:00 Subject: Re: Ruby expressions vs. values (like Perl?) On 10/13/06, Rick DeNatale wrote: > On 10/12/06, AlexG wrote: > > > [snip] > > If the interpreter simply broke that down into series of assignments > without the temporary array, then it would need to detect such cases > and handle them separately or: > > x = 1 > y = 2 > # x, y = y, x > # converted into > x = y > y = x > > x => 2 > y => 2 > > which is not what we want. Ah. Of course. Thanks. Also, to answer my own original question, I think actually that it may not've had much pith to it... That is to say, everything the interpreter sees is an "expression" of some kind (regardless of the name one wants to give that expression). I think, most of the time, ruby simply turns expressions into what values you think they should be turned into, and (as Booker mentions) sprinkles little syntactic sugar bits around here and there for the programmer's convenience. Perl does the same thing, except it has some arguably quirkier rules about the values it thinks the expressions should be evaluated to. Thanks, ---John