Asking for the opinion of DMD developers

Elie Morisse syniurge at gmail.com
Sun Oct 13 15:15:14 UTC 2019


On Sunday, 13 October 2019 at 15:06:11 UTC, Elie Morisse wrote:
> In C++ they only alias types, while in D there is no concept of 
> alias template,

By that I meant that:

alias SomeAlias(T) = ...;

is syntactic sugar for:

template SomeAlias(T) { alias SomeAlias = ...; }


And unlike in C++ SomeAlias might have overloads that instantiate 
something completely different :

template SomeAlias(T : char) { enum SomeAlias = 987; }
template SomeAlias(T : int) { void SomeAlias() {} }


More information about the Digitalmars-d mailing list