Should we deprecate comma?

Dicebot public at dicebot.lv
Mon Mar 24 10:03:15 PDT 2014


On Monday, 24 March 2014 at 16:57:09 UTC, bearophile wrote:
> So you are saying you want to support a syntax like this?
>
> tuple(a, b, c) = myFunc();
>
> Bye,
> bearophile

This actually almost works:

auto foo()
{
	return tuple(1, 2, 3);
}

void main()
{
	int a, b, c;
	
	tuple(a, b, c) = foo();
	writeln(a, b, c); // 000
	
	TypeTuple!(a, b, c) = foo();
	writeln(a, b, c); // 123
}


More information about the Digitalmars-d mailing list