Java has this feature, that allows you to deprecate stuff. The compiler will then issue warnings, if those elements are used by non deprecated elements.
While this seems to be a good idea in fact it isn’t. If you have to change something, just do it and get immediately rid of all the crap or it will stay around.
Just suppose you want to change the return type of a method. You have to deprecate the old method and introduce a new method with a new (and probably awkward) name. Then you can remove the old one at some point. Another step of deprecation will allow you to rename the new method to the original name. This is not going to lead to nice code!
Leave a Reply