Template params: decl vs instantiation syntax
Nick Sabalausky
a at a.a
Wed Oct 6 19:02:49 PDT 2010
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.
More information about the Digitalmars-d
mailing list