deprecate deprecated?

Jonathan M Davis jmdavisProg at gmx.com
Tue Nov 6 17:12:45 PST 2012


On Tuesday, November 06, 2012 15:56:09 Walter Bright wrote:
> I know there's been some long term unhappiness about the deprecated
> attribute - it's all-or-nothing approach, poor messages, etc. Each change
> in it changes the language and the compiler.
> 
> Perhaps it could be done with a user defined attribute instead?
> 
> Anyone want to take on the challenge?

And how would this interact with -d? It's one thing to give symbols attributes 
which can be examined at compile time. It's quite another to make it so that 
they don't compile without a specific compiler flag.

I also don't really get what we gain from this. The only thing that I'm aware 
of which is really up for debate at this point is whether deprecated should 
result in an error or a warning. We even have messages for it now.

Adding custom attributes which somehow indicate "scheduled for deprecation" or 
something like that might make sense, but what is beneficial abou removing 
deprecated itself from the language? How could that even work given that
deprecated does more than simply tag the symbol with information?

- Jonathan M Davis


More information about the Digitalmars-d mailing list