Alternative template instantiation syntax
Simen Kjærås
simen.kjaras at gmail.com
Thu Jan 26 17:24:51 PST 2012
A pattern in D is this:
alias Foo!q{
stuffs
} MyFoo;
Where Foo is a templated struct/class. In many ways, this is similar to
defining a new type, and I therefore throw out the suggestion that the
syntax should reflect this. I may be wrong, but I think this syntax is
unused and fitting:
Foo MyFoo!q{
stuffs
}
This is clearly symmetrical with the definition of normal types:
class MyClass {
}
struct MyStruct {
}
enum MyEnum {
}
Critique? Thoughts?
More information about the Digitalmars-d
mailing list