"Jonathan M Davis" <jmdavisp...@gmx.com> wrote in message news:mailman.1520.1310357559.14074.digitalmars-d-annou...@puremagic.com... > Now, if deprecated were improved to take a message (and to allow for soft > deprecation, since the messages printing here are about stuff being > scheduled > for deprecation rather than actually being deprecated yet), then maybe > they > could give a useful file and line number (at least for the functions), > since > then the compiler would know that a function was scheduled for deprecation > and > could warn you about using it. But since the best that we have for that is > pragmas, that doesn't work. And actually, without that sort of feature, > any > function that isn't a template can't even have such a message - at best it > can > have a note in the documentation. >
Would the following cover all the common use cases? (Phobos seems to be the biggest user of deprecated so far) deprecated("message") int a; deprecated("message", warn) int b; With deprecated(warn) messages only being displayed with warnings enabled. As in, an implementation of http://d.puremagic.com/issues/show_bug.cgi?id=5481