Should pure nothrow ---> @pure @nothrow ?
    Denis Koroskin 
    2korden at gmail.com
       
    Fri Nov 27 01:17:39 PST 2009
    
    
  
On Fri, 27 Nov 2009 12:09:05 +0300, Don <nospam at nospam.com> wrote:
> #ponce wrote:
>>> Definitely. And what about @deprecated and @override?
>>  As override is now required, i don't think it should be an attribute.
>
> As I understand it, one of the characteristics of attributes is that you  
> should be able to remove them from the entire program, without affecting  
> the behaviour.  All they are doing is adding additional compile-time  
> constraints. (const and immutable aren't attributes, because you're  
> allowed to overload functions based on them).
>
> So @deprecated is definitely an attribute.
>
> Is override really required? I've just tested on DMD2.037, and it still  
> accepts functions without it. So at present it is behaving like an  
> attribute. But if it became mandatory, I'm not so sure.
override is required when compiling with -w.
By Walter's definition, @property is not a valid attribute, because by  
removing it the program will fail to compile (due to missing parens in  
accessors). Either that or omissible empty parens will still be present,  
but I see no usefulness of @property in that case.
    
    
More information about the Digitalmars-d
mailing list