Newbie question

J J azreal1977 at hotmail.com
Mon Jul 30 16:04:04 UTC 2007


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.> To: squeak-dev at lists.squeakfoundation.org> From: blake at kingdomrpg.com> Date: Mon, 23 Jul 2007 12:58:25 -0700> Subject: Re: Newbie question> > On Mon, 23 Jul 2007 12:27:21 -0700, subbukk <subbukk at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070730/c85d01e1/attachment.htm


More information about the Squeak-dev mailing list