terminologia – What is deprecated code?

Question:

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

Answer:

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

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

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

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

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

  3. [Biology] Underdeveloped. = ATROPHIATED, RUDIMENTARY ≠ HYPERTROPHIATED

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

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

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

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

de·pre·ci·ar – Conjugate transitive verb

  1. Lower the value of. transitive verb and pronominal

  2. Don't give or don't give yourself your fair value.

"depreciado", 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 about other countries).

de·pre·ca·do (Latin deprecatus, -a, um, past participle of deprecor, -ari, seek to remove through supplications, ask, supplicate, 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 sent a decree or request for an act or diligence.

  2. [Computers] Its use is no longer recommended (eg 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 specific to PHP. Whenever you see this markup in some documentation, don't use it, try to know what you should 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 always be treated as errors. What is obsolete may one day cease to exist.

Some say that deprecated is what will become obsolete, and obsolete is what has been removed. This makes no 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 quote what used to exist and no longer exists, the term should be "removed" or something that conveys this idea.

Scroll to Top