[Issue 15464] Template parameter-dependent attributes

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Dec 23 19:02:21 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15464

--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Daniel Kozak from comment #5)
> So only postfix UDAs change and break, this can be  maybe avoid if this new
> lowering will be applied only to UDAs with templates parametrs.
> 
> The biggest problem I see here is consistency

Yes, my concern is consistency. Currently label, block, prefix, and postfix
style attributes (both built-ins and UDAs) have no difference. If attributes
conflict, the innermost attribute is precedence. And, prefix and postfix
position are treated as "same level". For example:

@safe void foo() @trusted {}
// Error, prefix @safe attribute conflicts with postfix @trusted

If this enhancement needs to break existing consistency, it should have clear
answers which derived from some new language design decisions. Otherwise the
enhancement will be a merely convenient feature and will increase the chaos in
D.

--


More information about the Digitalmars-d-bugs mailing list