Deprecation policy
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Wed Feb 3 11:25:20 PST 2016
On Tuesday, 2 February 2016 at 14:05:05 UTC, Marc Schütz wrote:
> Can someone point me to our current deprecation policy?
>
> The "Deprecated Features" page [1] lists some features that we
> already warn about for some time, that could probably be moved
> forward. `.sort/.reverse` in particular is something we should
> get rid of better sooner than later.
>
> [1] http://dlang.org/deprecate.html
With regards to language features, we really don't have a policy.
Some stuff has been in the state of "we're definitely going to
deprecate it" for ages (e.g. delete and using scope on local
variables) but never actually gets deprecated, and other stuff
gets deprecated but doesn't get removed for ages. And I think
that it mostly comes down to when a compiler dev feels like
making the change (and they usually don't - probably because they
have much more interesting and pressing things to worry about).
The situation with deprecations in the standard library is
generally much better, but that's because I manage it and mostly
keep on top of it (though occasionally, I've missed something,
and it's sat around for way too long). AFAIK, none of the
compiler devs really want to be the one to make sure that
deprecations in the compiler get moved along (especially since
it's generally more complicated than using the deprecated
attribute). So, it happens whenever someone happens to feel like
doing it rather than on any kind of schedule.
Now, in this particular case, you're talking about features that
were warned about starting in 2.067, which was released at the
end of March of last year. Removing them now would be awfully
quick. The deprecation cycle in Phobos is two years long so that
folks have plenty of chance to update their code, and older code
that's not well maintained has some chance of compiling when it
is finally brought up to date. So, I'm inclined to think that
it's way too early to remove .sort or .reverse from the language.
Of greater concern to me are the features that we never actually
deprecate even though we're sure that we want to (e.g. delete),
because that just means that more and more code gets written
which uses it without getting a deprecation message or a warning
to indicate that the code should not be written that way.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list