A Discussion of Tuple Syntax

Meta jared771 at gmail.com
Mon Aug 19 17:28:46 PDT 2013


On Tuesday, 20 August 2013 at 00:13:24 UTC, Dicebot wrote:
> No. No. Absolutely no. What you want is simply syntax sugar for 
> std.typecons.Tuple - it is not worth any language change, 
> contrary to semantical issues with built-in tuples. 
> Auto-expansion and integration with function/template parameter 
> lists is what makes D built-in tuple that useful and it should 
> stay so with hypothetical tuple literals.

Yes, changing semantics is a bad thing, which is why I was 
originally thinking of the tuple syntax as sugar for 
std.typecons.Tuple. The proposed syntax takes a hit if it is just 
sugar for the compiler tuples. They will break in some cases when 
being passed to functions, and will still not be able to be 
returned from functions.


More information about the Digitalmars-d mailing list