Delphi has a deprecated
hinting directive 1:
Hinting Directives
The 'hint' directives platform
, deprecated
, and library
may be appended to any declaration. These directives will produce warnings at compile time. Hint directives can be applied to type declarations, variable declarations, class, interface, and structure declarations, field declarations within classes or records, procedure, function, and method declarations, and unit declarations.
...
... Use platform
to mark items that are specific to a particular operating environment (such as Windows), deprecated
to indicate that an item is obsolete or supported only for backward compatibility, and library
to flag dependencies on a particular library or component framework.
...
For example:
procedure SomeOldRoutine; deprecated 'This is old use SomeNewRoutine instead';
1: Note that Delphi's documentation does not describe the ability to include a user-defined warning message on deprecated
, but it is actually supported since Delphi 2009 (deprecated
itself was introduced in Delphi 6).