[Issue 14389] The "(attributelist):" attribute notation scope of effect

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Apr 2 00:53:39 PDT 2015


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

--- Comment #5 from Daniel Čejchan <czdanol at gmail.com> ---
n reply to Ketmar Dark from comment #3)
> or simply introduce syntax to "unattribute" something. this is much more
> useful, imo, and not breaking any existing code.
> 
> this is very sad situation, as we can override `@safe`/`@trusted`/`@system`,
> but has no way to override `static`, or `final`, or `pure`, or `nothrow`,
> or...

Unattribute notation would make the code even more messy imo. One would have to
remember not only all the attributes he defined before, but also which ones he
removed and which he hasn't. That method would also practically double the need
of text writing for all attributes except for the cases where you want the
attribute to apply till the end. In overwhelming majority of cases in my
programming experience, I don't want it. I want just a portion of code to have
the same attribute and I want to avoid using {} notation because it makes the
code ugly. Not to mention you could forget unattributing some attributes, which
could make a mess in the code and there would be nomway how to chceck it,
because not removing it would be legitime intent.

--


More information about the Digitalmars-d-bugs mailing list