Template declaration/instantiation

Tom Tom_member at pathlink.com
Sat Mar 4 09:26:47 PST 2006


In article <ducfbj$1vds$1 at digitaldaemon.com>, Jarrett Billingsley says...
>
>"Tom" <Tom_member at pathlink.com> wrote in message 
>news:duca8l$1mik$1 at digitaldaemon.com...
>> Just for curiosity: why template declaration doesn't use '!()' instead of 
>> '()'.
>> Wouldn't using the same symbols in both (the declaration and the 
>> instantiation)
>> be a little more "consistent" to the sight?
>
>It has to do with it being a context-free grammar.  That is, if templates 
>just used plain old parentheses, it would take more work to determine what 
>the symbol was that preceeded them.
>
>I like !(), I see it and immediately know I'm dealing with a template.  It's 
>like how <> stands out in C++ templates. 

I'm not complaining about !(). I'm asking, why not use !() in the template
declaration as well.

Tom;



More information about the Digitalmars-d mailing list