“Deprecate”, the most misused word in software engineering

Dan Jarvis
2 min readApr 18, 2024

In software, deprecate means to discourage the use of something. It’s often used in APIs to indicate that a method is likely to be removed in a future version of the API.

In Java, the @Deprecated annotation is used to indicate that a method is deprecated:

Compilers warn when a deprecated program element is used or overridden in non-deprecated code.

I often see people say “deprecate” when they’ve completely removed a feature from the codebase.

Wikipedia’s definition:

In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing it or prohibiting its use. Typically, deprecated materials are not completely removed to ensure legacy compatibility or back up practice in case new methods are not functional in an odd scenario.

Android’s definition:

Deprecation means that we’ve ended official support for the APIs, but they will continue to remain available to developers.

Examples

For fun, let’s look at a specific example from Android.

ActivityManager.TaskDescription#TaskDescription() was added in API level 21, was deprecated in API level 28, but is still available to use today in Android API level 34:

You can use the Android API Differences Report for API Level 28 to find which APIs were added, changed (including marking as deprecated), or removed:

--

--