Alias Vs. Enum?
Simen Kjærås
simen.kjaras at gmail.com
Sun Jan 7 18:30:17 UTC 2018
On Sunday, 7 January 2018 at 03:52:53 UTC, Stefan Koch wrote:
> The compiler can only alias to symbols and not to values.
> therefore enum was chosen for manifest constants.
>
> That alias can bind to values in template-parameters is useful
> but not exactly consistent :)
Not only that, but alias can bind to values if they're from a
template alias parameter, hence std.meta.Alias. Instead of doing
that silly dance, alias should simply take values as well.
--
Simen
More information about the Digitalmars-d
mailing list