Multiple Returns, was Re: Common Lisp style macros in Smalltalk?

David N. Smith (IBM) dnsmith at watson.ibm.com
Tue Jan 11 23:34:14 UTC 2000


At 20:28 -0800 1/10/2000, Stephen Travis Pope wrote:
>"Martin B. Pomije" wrote:
>>
>>  Has anybody on this list ever contemplated incorporating CL style macros
>>  into Smalltalk?  Or am I just stuck in Lispish thinking?
>
>I think the latter ("stuck in Lispish thinking"). I, too, came to
>Smalltalk from LISP, and initially missed several features of LISP, but
>the only one I still pine after is multiple value returns.

I miss them, too, since I spent a while programming in PostScript; 
the symmetry of sending and returning is so nice it made me like a 
language that is difficult to love, and I've missed multiple returns 
ever since.

I came up with some syntax for multiple return values in Squeak. I 
don't offhand see any syntax conflicts and I don't have a clue how to 
make it work efficiently at runtime, but it may be something to throw 
rocks at. I'm concerned about how often such a feature would really 
be used; is it worth making syntax changes?

Multiple assignment:   (a b c) := self get3things.

Returning values:      ^ x . y squared . z asInteger

See attachment for details.

Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mutiple_return_values
Type: application/mac-binhex40
Size: 3973 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000111/f6db8730/mutiple_return_values.hqx
-------------- next part --------------
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
_______________________________
Any opinions or recommendations
herein are those of the author
and not of his employer.


More information about the Squeak-dev mailing list