To everybody proposing "full" tuple returns
Bill Baxter
dnewsgroup at billbaxter.com
Mon Apr 14 18:48:24 PDT 2008
downs wrote:
> Please, read the NG. The more powerful ()-based syntax has been brought up before, and nothing ever came of it (there's some ambiguity with the comma operator)
>
> This time around, I chose a syntax that was intentionally based on existing language features, precisely to sidestep those issues.
>
> Imnsho, multiple return values are useful enough to warrant an implementation even if we can't have full ()-based tuple assignment and returning support.
>
> --downs
You're talking about just bare parentheses right? That's not the only
option. Right now from what I understand Tuple!(int,float) can be a
return value from a D2 function. So the question is just can we make a
nicer way to write Tuple!(int, float) that isn't ambiguous.
You just need something to disambiguate out in front.
Like maybe @(int,float)
--bb
More information about the Digitalmars-d
mailing list