On Monday, 5 November 2012 at 08:53:48 UTC, Johannes Pfau wrote:
As deprecated now allows optional messages some folks have
suggested to
make deprecated behave like in other languages: Warn if
something
deprecated is used, do not print warnings if compiling with
-deprecated.
This would conflict with your proposed usage of
version(deprecated).
I've thought about this some more, and my conclusion is:
irrelevant.
At the end of the say, when the code is compiling, it can be in
only one of two states:
* deprecated methods are illegal
* deprecated methods are legal (with or without warnings: who
cares)
So basically, without worrying about how the "-d" switch works
(or will work in the future), we can have a version(deprecated)
that returns true if "using deprecated stuff is legal" and false
otherwise.
Basically, I think having a version(deprecated) and a "warn when
using deprecated stuff" are two orthogonal concepts that can
coexist without clashing.