[Cuis-dev] Methods that return multiple values
Nicolás Papagna Maldonado
nicolas.papagna at gmail.com
Wed Jun 21 06:58:23 PDT 2023
Interesting!
For multiple-value returns, how about an object holding these values?
I know this might introduce many of these tiny objects, but I'm okay with
that!
IIRC Leandro implemented a feature in Bee where you can return anonymous
objects.
Something along the lines of {foo: 1, bar:2}. Then you can do `result foo`,
etc.
I'm more on keeping the syntax simple camp, but that is an interesting idea
too.
Cheers,
Nico PM
On Wed, Jun 21, 2023 at 10:54 AM Mariano Montone via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> 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
>
--
Nicolás Papagna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230621/58b3fb38/attachment.htm>
More information about the Cuis-dev
mailing list