deprecate deprecated?

Leandro Lucarella leandro.lucarella at sociomantic.com
Sun Nov 11 05:09:31 PST 2012


On Thursday, 8 November 2012 at 08:13:37 UTC, Don Clugston wrote:
> On 07/11/12 00:56, 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?
>
> That *cannot* fix the problem.
> The problem is not with the deprecated attribute at all, it's 
> with the command line switches.

Exactly, deprecated is one of those features that *needs* to be
in the compiler, at least part of it. Because is not only about
the deprecated attribute for user symbols, there are also
deprecated constructs in the language, that only the compiler can
detect and can emit messages for.

Having deprecated as a core part of the language is not an
option, is the only way to do it right, so why don't we just fix
it in the compiler then? Adding the deprecated("message") syntax
was a huge step forward. Now we just need an option to emit
deprecations as warnings and that's it. It's already there, you
just have to merge it :)

https://github.com/D-Programming-Language/dmd/pull/1185


More information about the Digitalmars-d mailing list