terminology – What is a deprecated code?


What is a deprecated code (code depreciation)? I heard about a video class and I was in doubt.


The real meaning for what the term is used in our field is obsolete , although it is not the exact translation, it is what makes it clear to us. At least it's considered obsolete by the original developer. You should do the same as much as possible. And it's always possible in new codes.

It is something that should no longer be used . It's an existing feature, but it's considered outdated and has something better to use.

ob·so·le·to |e| (Latin obsoletus, -a, -um, worn, fallen into disuse) adjective

  1. Fallen into disuse; which is no longer used. = ARCHAIC

  2. That is out of fashion or does not correspond to the latest technical developments. = OLD FASHIONED, OUTDATED ≠ .CURRENT, MODERN

  3. [Biology] Poorly developed. = ATROPHIC, RUDIMENTARY ≠ HYPERTROPHIC

"obsolete", in Priberam Dictionary of the Portuguese Language [online], 2008-2013, https://www.priberam.pt/dlpo/obsoleto [accessed on 18-01-2017].

In English it is also used obsolete . Strictly it would be the translation of obsolete, but it is more important to say something people understand than to have a literal translation.

The term "deprecated" is a translation of depreciated which has another meaning, and therefore is a mistranslation of deprecated . Deprecated is something diminished, reduced in value, which is not quite the case for our use, although it may be understandable.

Unless the video is badmouthing a code, it's deprecating it, but if that's it, there's nothing technical about it 🙂

de·pre·ci·ar – Conjugate transitive verb

  1. Downgrade the value of. transitive and pronominal verb

  2. Not giving or not giving their fair value.

"depreciated", in Priberam Dictionary of the Portuguese Language [online], 2008-2013, https://www.priberam.pt/dlpo/depreciado [accessed on 18-01-2017].

If you don't like obsolete you can use "deprecado" which is a valid word in Portuguese and is strictly the most correct translation. But that doesn't mean much to a Brazilian or Portuguese, according to Jorge B. in a comment below (I don't know in other countries).

de·pre·ca·do (Latin deprecatus, -a, um, past participle of deprecor, -ari, seek to remove by supplication, ask, plead, remove, demote, intercede, ask for forgiveness) adjective

  1. [Legal, Jurisprudence] It is said of the judge or court to which a judge or court has ordered a deprecation or a request for .act or diligence.

  2. [Computers] The use of which is no longer recommended (ex.: this function is not obsolete, but it is deprecated).

"deprecado", in Priberam Dictionary of the Portuguese Language [online], 2008-2013, https://www.priberam.pt/dlpo/deprecado [accessed on 18-01-2017].

use in languages

This is not something PHP specific. Whenever you see this marking in some documentation, do not use it, try to know what to use instead. There are pages for each version indicating what was deprecated. Example in 5.5 . When there's no substitute, it's because you shouldn't use anything, that's bad in itself.

It is common for them to generate a warning . And warnings should be treated as errors, always. What is obsolete may one day cease to exist.

There are those who say that deprecated is what will become obsolete, and obsolete is what has been removed. This doesn't make sense, after all what was removed is no longer obsolete, it is non-existent. What does not exist cannot be called deprecated or obsolete. In this case, if you are going to mention what existed and does not exist anymore, the term should be "removed" or something that conveys that idea.

Scroll to Top