On Friday, 18 August 2017 at 18:15:33 UTC, Timon Gehr wrote:
[...]

alias naughty = AliasSeq!(impure,system,throws,gc);
alias nice = AliasSeq!(pure,safe,nothrow,nogc);

@nice void foo();
@naughty void bar();

We have to consider the potential for abuse.

For example, D's templates are great - but it doesn't mean that if you're making a math library, that you should template your matrix class on it's dimensions, just to fill it with static if's because half of the functionality only applies to a single dimension. Especially when you typically need 2-3 different versions at most(mat2, mat3, mat4). People do it though.

If things did turn out to be as simple as the example you posted, then I could see it being a useful way to hide some of D's painful attribute bloat, but I've got a feeling we'd start seeing things like "nice", "nicer", "nicest", "niceInDebugModeButNotReleaseModeUnlessAssertsAreEnabled", etc.....

Reply via email to