I have accidentally inserted the bang in the template decl so many times..

There's no grammatical reason to leave it out

On 10/06/2010 09:02 PM, Nick Sabalausky wrote:
A trivial thing, but something I've been wondering about for awhile:

Function parameter syntax:
     Declare: foo(bar)
     Call: foo(bar)

Template parameter syntax in C++/C#/etc:
     Declare: foo<bar>
     Instantiate: foo<bar>

Template parameter syntax in D:
     Declare: foo(bar)
     Instantiate: foo!(bar)

Why the difference in syntax between declaring and instantiating? Why not
use the exclamation for declaration too? Would that create a grammar
ambiguity? Some other reason? No particular reason?

Obviously it's not a big issue, just curious.


Reply via email to