On 11-11-2012 14:09, Leandro Lucarella wrote:
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

I'm against that pull request. Not because I think it isn't useful, but because I think it doesn't fix the problem.

Usage of deprecated symbol(s) should be a warning by default and the new option should be used to turn that into an error; not the other way around.

--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org

Reply via email to