Multiple return values...

bearophile bearophileHUGS at lycos.com
Thu Mar 8 16:26:04 PST 2012


Manu:
7
> How is any programmer supposed to intuitively assume that returning a tuple
> by value would behave in that way? And how are you supposed to trust it?
> It's an abuse of concept and syntax. It seems like a convolution that could
> only possibly confuse people, they are conceptually quite different things,
> and shouldn't be lumped into the same syntax for my money.

I am asking for multiple return values in D since some years, so I share your desire. But keep in mind that in D currently there are Phobos Tuples and DMD typetuples. Adding a third type of tuple-like things in a single language sounds a bit excessive. Two kinds of tuples in a language are already too much, in my opinion.

Bye,
bearophile


More information about the Digitalmars-d mailing list