deprecate deprecated?

Sönke Ludwig sludwig at outerproduct.org
Wed Nov 7 00:06:41 PST 2012


Am 07.11.2012 03:55, schrieb Andrei Alexandrescu:
> On 11/7/12 1:56 AM, 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?
> 
> I don't think that's possible. One would need a mechanism to hook into
> all calls to a function (adorned with a specific attribute) and emit the
> message during compilation. That is missing.
> 
> Andrei

If that was there though, it would also be very close to being able to
define things like @safe or @nothrow or @nogc as pure library
functionality. This could offer some very interesting new static
checking opportunities.


More information about the Digitalmars-d mailing list