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

--- Comment #6 from Ketmar Dark <ket...@ketmar.no-ip.org> ---
simply resetting 'em all is messy too: then i have to repeat all that `@safe
nothrow @nogc` yet again when i changed visibility from `private` to `public`,
for example.

and making visibility resets only visibility is even worse, 'cause now i have
to remember what resets what.

on the other side, "unattributing" is really necessary, as there is no way to
"undo" some attributes at all.

sure, this is a matter of taste. i agree that `attr { ... }` is making code
ugly, and i try to avoid writing that when it is possible. but double colons
are very easy to miss (and mistype).

yet i see another possibility! ;-)

class A {
@safe: // this will last forever
(nothrow): // and this will be reset on next `id:` or `(id):`
}

this way it's easy to notice what is what, and using `()` suggests at least
something. for me it tells "hey, i'm not permanent, hence the brackets here!"

--

Reply via email to