4 ms·
> Deprecated just means "do not use in new code" I originally learned that "deprecated" was meant to indicate that the language no longer promised to include t
by gknoy 9y ago
> Deprecated just means "do not use in new code"
I originally learned that "deprecated" was meant to indicate that the language no longer promised to include that feature in a future version. So, it still works now, but this is your warning that you should be moving away from it.
- kazinator 9y agoMerriam-Webster gives these meanings for "deprecate": "to pray against something, such as an evil (archaic)", "to avert", "to play down" (e.g. one's talent), "to express disapproval of, to disparage".
- kazinator 9y agoHow this definition is relevant is that the word is used specifically for features that are looked down upon as being harmful in some way, and so using them in programs is creates some kind of risk in addition to "this won't build when it goes away". The dictionary meaning which comes into play in the software maintenance use of "deprecated" is that "disapprove/disparage" one. Something that will be removed because it is unfashionable, and being replaced by shiny new idioms, is "obsolescent". Rather than abruptly removing such features, we phase them through an obsolescence period. Deprecated example: the C gets function (almost impossible to use without creating a security hole, now removed from ISO C). Obsolescent example: bzero function. (Appears in tradtional BSD sockets networking code, superseded by memset).
- djur 9y agoThe C++ standard defines it like that: "Normative for the current edition of the Standard, but having been identified as a candidate for removal from future revisions. An implementation may declare library names and entities described in this section with the `deprecated` attribute."