[Issue 13388] accept '@' before 'nothrow', 'pure', 'final', 'abstract' and 'override'
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 29 02:47:14 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13388
--- Comment #16 from Trey Brisbane <tbrisbane at gmail.com> ---
Frankly, this is a problem. Problems should be fixed. With attribute syntax,
there are cross-cutting concerns...
Static is an attribute that fundamentally changes the semantics of the method
it's on.
Pure, is an attribute that ensures the function does not touch global state.
But that's kinda just saying "This is my intent. Please check that for me.",
rather than any real semantic change. In my opinion, pure should be an
annotation, but it's a keyword.
When I, and I'm sure many others, write code, I like to separate out
annotations and place them above the method declarations, but I can't do this
effectively in D because some are keywords, and so there's no logical
separation that facilitates elegant code.
If we only look at this issue in isolation, the payoff is small for a
relatively intrusive change. But if we look at the bigger picture of this issue
along with the many other small issues that aren't going to get fixed under the
current mindset, then by fixing it we move one step closer towards a better
language that will ultimately be more attractive to more users.
--
More information about the Digitalmars-d-bugs
mailing list