Negation of attributes (DIP 79)

Daniel Kozák via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 4 00:50:41 PDT 2015


On Wed, 03 Jun 2015 21:19:19 +0000
Jonathan M Davis via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Tuesday, 2 June 2015 at 10:29:35 UTC, Daniel Kozak wrote:
> > I am working on dip which will try to addressed negation of 
> > attributes issue.
> > http://wiki.dlang.org/DIP79
> 
> You need to iron out what happens with attributes like 
> @safe/@trusted/@system or public/protected/package/private. 


nothing, there is no need to revert them or do anything special

> Simply turning them on and off doesn't really work.
> 
> Regardless, I think that attribute(boolean expression) is the 
> clear winner, because it's for more flexible. Without the ability 
> to provide a boolean expression, some code will be forced to use 
> compile-time introspection to determine which attributes are 
> enabled and then enable or disable them as appropriate in 
> different static if branches. That sort of case is really only 
> going to pop up in generic code, but once you start turning 
> attributes on and off, I fully expect that it will come up, in 
> which case, a syntax such as !final won't work very well.
Yes I know, but I still do not feel right about that.


More information about the Digitalmars-d mailing list