Pair literal for D language

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 28 12:39:32 PDT 2014


On Saturday, 28 June 2014 at 09:15:29 UTC, Dicebot wrote:
> On Friday, 27 June 2014 at 22:01:21 UTC, Mason McGill wrote:
>> I like DIP54 and I think the work on fixing tuples is awesome, 
>> but I have 1 nit-picky question: why is it called 
>> "TemplateArgumentList" when it's not always used as template 
>> arguments?
>>
>>  void func(string, string) { }
>>
>>  TypeTuple!(string, string) var;
>>  var[0] = "I'm nobody's ";
>>  var[1] = "template argument!";
>>  f(var);
>>
>> Why not a name that emphasizes the entity's semantics, like 
>> "StaticList"/"ExpandingList"/"StaticTuple"/"ExpandingTuple"?
>
> Because it is defined by template argument list and has exactly 
> the same semantics as one. And semantics are unique and obscure 
> enough that no other name can express it precisely.
>

You keep repeating that, but people keep being confused. It is 
time to admit defeat.

> 'StaticList' is what you may have wanted it to be but not what 
> it is.

It is whatever we choose it is.


More information about the Digitalmars-d mailing list