Multiple return values...

bearophile bearophileHUGS at lycos.com
Thu Mar 15 15:57:13 PDT 2012


Andrei Alexandrescu:

> generally the question is not "why couldn't we add syntax X?" but 
> instead "why should we add syntax X?"

You are right. Tuples are a basic data structure, some other language constructs are built on them (swapping items is just one of their purposes, then there is multiple return values). They are not necessary, so if you don't want to add the syntax sugar we'll do with the libray Tuple we have. But so far I have not seen ways to replace that syntax sugar with with something else.

Bye,
bearophile


More information about the Digitalmars-d mailing list