How long should we keep deprecated methods?
How long should we keep deprecated methods?
I just removed getMS3DJointNode and getXJointNode which had been sat in the API unused for a few years and was thinking: what amount of time is a reasonable length to keep deprecated methods before they are removed from the API?
I was thinking two, maybe three major releases, with a warning in the docs saying when they were deprecated and/or when they will be removed.
Any thoughts, objections or other ideas? How do other APIs deal with this?
I was thinking two, maybe three major releases, with a warning in the docs saying when they were deprecated and/or when they will be removed.
Any thoughts, objections or other ideas? How do other APIs deal with this?
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
I don't know how other libraries handle this, but three major releases seems a bit long to me
I always interpret deprecated functions as 'don't expect this function to be available in the next release', and maybe it's not a bad idea to keep deprecated functions for just one major release so people don't integrate these too deeply in their code
I always interpret deprecated functions as 'don't expect this function to be available in the next release', and maybe it's not a bad idea to keep deprecated functions for just one major release so people don't integrate these too deeply in their code
In my opinion, if in current major release we have signed some function as a deprecated in next major release this function should be removed.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Imho it would be OK to remove such methods in the next major version (one version where it's marked as deprecated, next version it's gone). I guess this helps to keep the interface small.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
sure remove early unused code and make irrlicht more modern in the fastest possible way . what is deprecated now can be removed from 1.8 and what is marked as deprecated in 1.8 will be removed in 1.9
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Doesn't matter to me, as long as the API and docs clearly state it will be deprecated... in huge bold capitalized letters nobody can miss. (instead of a tiny footnote for example...)
Also, what would be great is that along with the note, we can clearly see what methods/function(s) it is replaced by.
Also, what would be great is that along with the note, we can clearly see what methods/function(s) it is replaced by.
Oh, you're right, I see them now.
Just as an extra: if possible, I would make several improvements to the style. All the functions just kind of meld together right now.
*First, I would separate each item with a line break and a space. (between the "returns" section and the parameters section of a next function)
* Second, I would put create a heading text for each item before its parameters section. IE: "createImage" in (bold?) bigger text, as a heading, before its parameters box.
* I would put an additional "(deprecated)" tag for the heading if it is deprecated... I realize that a lot of functions are overloaded, so I am not sure how to easily modify this to handle overloaded functions.
* More info for deprecated section. For example, for one of the "createImage"s, it is stated that we should "Create an empty image and use copyTo()", but there is no link or other explanation on how we should actually create an empty image.
*First, I would separate each item with a line break and a space. (between the "returns" section and the parameters section of a next function)
* Second, I would put create a heading text for each item before its parameters section. IE: "createImage" in (bold?) bigger text, as a heading, before its parameters box.
* I would put an additional "(deprecated)" tag for the heading if it is deprecated... I realize that a lot of functions are overloaded, so I am not sure how to easily modify this to handle overloaded functions.
* More info for deprecated section. For example, for one of the "createImage"s, it is stated that we should "Create an empty image and use copyTo()", but there is no link or other explanation on how we should actually create an empty image.
IIRC "deprecated" is used to give developers some time to modify their code to use non-deprecated methods, so I thinks it's a good idea to keep those functions in for one major version. I don't know if the current C++ compilers support a "deprecated" warning that points you to deprecated methods you use - Java does (about the only thing I really like in Java ).
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames