On Mon, 30 Jul 2007 18:04:04 +0200, J J (in a hard-to-read HTML message :)
wrote:
>
> Well, it's syntactic sugar. It looks pretty alien in Smalltalk, but
> other languages support multiple-assignment (e.g. "swap" {a. b} := {b.
> a}). Of course this gets tricky because if you have multiple assignment
> it seems natural to return multiple values from a function (e.g. {a. b}
> := a swapWith: b). That would probably require a big change to
> implement and you end up with something Smalltalk can already do other
> ways, and become (more) incompatible with other dialects.
You can always do ^ {this. and / or. that} for returning multiple values,
without any change in Squeak.
> To:
[hidden email]> From:
[hidden email]>
> Date: Mon, 23 Jul 2007 12:58:25 -0700> Subject: Re: Newbie question> >
> On Mon, 23 Jul 2007 12:27:21 -0700, subbukk <
[hidden email]> wrote:>
> > > On Monday 23 July 2007 11:39 pm, Bert Freudenberg wrote:> >> >> Now,
> at one point the compiler even supported this:> >>> >> {a. b} := {1.
> 2}> >>> >> which I found cool but was considered evil, even by those
> who> >> tolerate the braces ...> > What would this do? It looks like
> you're assigning a literal to another > literal?>
> _________________________________________________________________
> Don't get caught with egg on your face. Play Chicktionary!
>
http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink