Pair literal for D language

Ary Borenszweig via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 28 14:51:16 PDT 2014


On 6/28/14, 6:49 PM, deadalnix wrote:
> On Saturday, 28 June 2014 at 21:22:14 UTC, Timon Gehr wrote:
>> On 06/28/2014 09:40 PM, deadalnix wrote:
>>> On Friday, 27 June 2014 at 05:45:19 UTC, H. S. Teoh via Digitalmars-d
>>> wrote:
>>>>> We'd make a step forward when we stop calling type tuples type tuples.
>>>>> They are not tuples, and do not contain (only) types.
>>>>
>>>> I agree, but that's what they're called in the compiler source code, so
>>>> it's kinda hard to call them something else.
>>>>
>>>
>>> http://www.reddit.com/r/programming/comments/298vtt/dconf_2014_panel_with_walter_bright_and_andrei/ciiw5zb
>>>
>>>
>>>
>>> :(
>>
>> Well, there are many things that could be considered tuples:
>>
>> void foo(int x, int y){
>> //      ^~~~~~~~~~~~~~
>> }
>>
>> void main(){
>>     foo(1,2);
>> //     ^~~~~
>> }
>>
>> :o)
>
> That is certainly a useful language construct (what Dicebot call
> TemplateArgumentList, but as we see, there s no template in this sample
> code), but certainly not what is commonly called a tuple.

I think it's common: 
http://julia.readthedocs.org/en/latest/manual/types/#tuple-types


More information about the Digitalmars-d mailing list