August 29, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

Orvid King <blah38621@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blah38621@gmail.com

--- Comment #21 from Orvid King <blah38621@gmail.com> ---
I have to agree with Jonathan here, and am strongly against this. While I can see an argument for it to be accepted before nothrow and pure, there's no reason it should be accepted before final, abstract, or override. Nothrow and pure are attributes that effectively constrain what can be inside the method, where-as final, abstract, and override all functionally effect the program.

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

--- Comment #22 from Trey Brisbane <tbrisbane@gmail.com> ---
Ketmar, what was your rational for including final, abstract and override in this patch?

Would you guys be more receptive to the idea if it was just nothrow and pure being affected?

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1391|0                           |1
        is obsolete|                            |
   Attachment #1392|0                           |1
        is obsolete|                            |
   Attachment #1393|0                           |1
        is obsolete|                            |

--- Comment #23 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
Created attachment 1400
  --> https://issues.dlang.org/attachment.cgi?id=1400&action=edit
allow UDA-like syntax for 'pure' and 'nothrow'

(In reply to Trey Brisbane from comment #22)
> Ketmar, what was your rational for including final, abstract and override in this patch?

parser checks for 'em all in the same place, that's it. ;-) ah, and to be consistent with '@property'.

> Would you guys be more receptive to the idea if it was just nothrow and pure being affected?
attached new patch. only 'pure' and 'nothrow' can be prefixed with '@' now. and fixed one bug.

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|accept '@' before           |accept '@' before 'nothrow'
                   |'nothrow', 'pure', 'final', |and 'pure'
                   |'abstract' and 'override'   |

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1400|0                           |1
        is obsolete|                            |

--- Comment #24 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
Created attachment 1401
  --> https://issues.dlang.org/attachment.cgi?id=1401&action=edit
allow UDA-like syntax for 'pure' and 'nothrow'

to remember: don't attach patches without proper checking. attached correct patch this time.

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

--- Comment #25 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
Created attachment 1402
  --> https://issues.dlang.org/attachment.cgi?id=1402&action=edit
testcase; must compile

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

--- Comment #26 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
Created attachment 1403
  --> https://issues.dlang.org/attachment.cgi?id=1403&action=edit
testcase; must fail with "'mustf.foo' is not nothrow" and "function 'mustf.bar'
is nothrow yet may throw"

--
September 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

--- Comment #27 from Don <clugdbug@yahoo.com.au> ---

>(In reply to Jonathan M Davis from comment #14)
>> I really think that we've passed the point where it's worth fixing it.

NO!!!! This attitude is the biggest problem D has.
Please, watch Scott Meyer's talk again. "Most D code is yet to be written".
The future benefits of fixing this kind of crap, are huge. And this one doesn't
even break any existing code.

Omitting the @ from pure and nothrow was heavily criticized at the time. It was known to be a stupid decision. Two things have changed since then:

(1) We now have UDAs.
(2) @property is gone.

Now, the existence of @property was the only decent argument against @pure,
@nothrow. Nobody could come up with a simple rule as to why 'property' should
be an attribute, because it did actually affect the semantics.
And (1) means that there are more benefits to making pure and nothrow behave as
any other property.

If we allow this, then we can just say "for historical reasons, you can leave the @ off @pure and @nothrow". I think that's far easier to justify than the current situation.

I'm fully in favour of this.

--
September 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13388

--- Comment #28 from Jonathan M Davis <jmdavisProg@gmx.com> ---
(In reply to Don from comment #27)
> >(In reply to Jonathan M Davis from comment #14)
> >> I really think that we've passed the point where it's worth fixing it.
> 
> NO!!!! This attitude is the biggest problem D has.
> Please, watch Scott Meyer's talk again. "Most D code is yet to be written".
> The future benefits of fixing this kind of crap, are huge. And this one
> doesn't even break any existing code.
> 
> Omitting the @ from pure and nothrow was heavily criticized at the time. It was known to be a stupid decision. Two things have changed since then:
> 
> (1) We now have UDAs.
> (2) @property is gone.

@property isn't gone. Kenji has been doing work on fixing it up, and in the end, we should end up in the situation where @property makes it so that parens are illegal, and parens are optional for non-@property functions with no arguments.

Regardless, I don't see any way that changing which attributes have @ on them and which don't is going to make it consistent unless you put @ on all of them, or you don't put it on any of them. So, either we end up with safe, trusted, system, and property, or we end up with stuff like @public, @const, and @static - which would be hideous IMHO. So, it seems to me that no matter which way we go, we end up with something that's ugly in some way or another, so I see no reason to change it. We'd just be moving the ugliness and inconsistency around. As it is, a very small percentage of the attributes have @ on them, which I think is a good thing. I'd much rather leave @ for UDAs.

Regardless, for anything like this to happen, you'd have to convince Walter, and this is exactly the sort of thing he's likely to say no to because it doesn't have any real practical, technical benefit. At best, it just makes it easier for newbies to figure out whether @ goes on the front of an attribute or not, and unless you put @ on _all_ of them, I don't think that it really even does that. So, you're going to have a very hard time convincing him. I expect that he'll see it as useless shuffling around that will break code for no real benefit.

- Jonathan M Davis

--
January 26, 2015
https://issues.dlang.org/show_bug.cgi?id=13388

sinkuupump@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sinkuupump@gmail.com
         Resolution|---                         |FIXED

--- Comment #29 from sinkuupump@gmail.com ---
Closing because this PR was merged:

accept @pure @nothrow @return attributes by Walter Bright https://github.com/D-Programming-Language/dmd/pull/4341

--