[Issue 13388] accept '@' before 'nothrow', 'pure', 'final', 'abstract' and 'override'

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 28 22:40:18 PDT 2014


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

--- Comment #5 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
i can't see why we can't turn const to '@const' too. this will remove
long-standing 'const confusion': '@const' can be only function attribute.

i didn't do it in this patch 'cause i believe that it's two very different
changes, and '@const' patch has no sense without this patch.

about 'static': this is not an 'attribute' like 'nothrow', 'cause we can't
write:

  void bar () static {}

(why, btw?)

i agree that enforcing '@' syntax is The Right Thing, but this will break alot
of code. allowing '@' is a little step towards consistency. yes, it makes some
mess, but it will allow to deprecate non-UDA attributes in the future.

i believe that turning D in C++ with "ah, we know about this inconsistent crap,
but it's our legacy and we have to live with it" will harm D in the long run.
language that trades developement for stability will become C++.

current attribute syntax is a mess. let's clean it up: first by allowing two
syntaxes (ok, it's confusing, but leaves some time to fix the old code) and
then by deprecating non-UDA syntax. if we will not do the first, we will never
do the second.

--


More information about the Digitalmars-d-bugs mailing list