[Cuis-dev] Methods that return multiple values

Christian Haider mail at christianhaider.de
Wed Jun 21 07:44:35 PDT 2023


Yes, it is a simple destructuring. The real thing I saw in Lisp was able to destruct lists of lists of lists ... 
Here it is the simple case for flat lists.

When I came across this, I asked in the vwnc list about the name. My proposal was something like #destuctDo:.
Other good names were #allIn: (which is implemented in Amber) or #in:.
Vanessa Freudenberg came up with #asArgumentsIn: which I adapted, because it names exactly what it does. 
The other names are nice and short, but not distinctive enough for my taste.
I have a hunch that there is a better name out there, but it has not been found yet.


-----Ursprüngliche Nachricht-----
Von: Cuis-dev <cuis-dev-bounces at lists.cuis.st> Im Auftrag von Mariano Montone via Cuis-dev
Gesendet: Mittwoch, 21. Juni 2023 15:54
An: Discussion of Cuis Smalltalk <cuis-dev at lists.cuis.st>
Cc: Mariano Montone <marianomontone at gmail.com>; Luciano Notarfrancesco <luchiano at gmail.com>
Betreff: Re: [Cuis-dev] Methods that return multiple values

El 21/6/23 a las 10:44, Luciano Notarfrancesco via Cuis-dev escribió:
> Interesting, thanks for sharing!
> Actually I think it’s the same thing I did

Yes, I think you've implemented destructuring rather than multiple-value return, as your solution can be applied to other things than method call returns.

This is something nice to have, makes code more readable.


     Mariano


--
Cuis-dev mailing list
Cuis-dev at lists.cuis.st
https://lists.cuis.st/mailman/listinfo/cuis-dev



More information about the Cuis-dev mailing list