dragon-lang / dc

D Compiler
Boost Software License 1.0
8 stars 0 forks source link

Consistent Alias; alias parameter sequence #79

Open ntrel opened 4 years ago

ntrel commented 4 years ago

An alias template parameter can be passed a literal value or enum value. An alias declaration cannot alias these values, this is inconsistent. Instead you have to use e.g. std.meta.Alias. Alias declarations should be able to alias values for ease of metaprogramming.

A separate tweak would be for variadic templates to require alias args... for a parameter sequence that isn't just types. T... without alias would then mean types only. This would help to distinguish the two cases from the template signature, and types only is the much more common case. It would also mean that variadic parameters are declared the same as non-variadic parameters, but with a ... ellipsis.