dropping parentheses on template instantiation

KennyTM~ kennytm at gmail.com
Sun Oct 5 23:01:52 PDT 2008


Andrei Alexandrescu wrote:
> Ary Borenszweig wrote:
>> KennyTM~ escribió:
>>>
>>> It seems that
>>>
>>> Stack!int
>>> Stack at int
>>> Stack#int
>>
>> Well, another possibility is:
>>
>> Stack¿int? stack;
>> HashMap¿float, long? map;
>>
>> Why didn't anyone mention that before? :-)
> 
> You sure meant:
> 
> ¿Why didn't anyone mention that before?
> 
> 
> Andrei

Yeah, if so I'd surely just use

   Stack«int»

as it *is* some kind of brackets, resembles C++'s (Java, C#) Stack<int> 
and won't cause confusion (How will you parse

   Template¿true?2:1

?) But it's better to restrict to ASCII characters only, unless you want 
to implement APL in D...



More information about the Digitalmars-d mailing list