Identifies a declared element as deprecated.
@Deprecated [ message ]
- Optional string literal shown as part of the compiler warning.
If you made a library that other programmers can use, then you could make the decision that a declared element, for example, a method, will not be necessary. You can remove it, but that can cause errors for your users. An alternative is to deprecate that element, then remove it in a subsequent version.
With most other programming languages it is not easy to deprecate features of a library. A user must know to look in comments in the code, the change log, or in documentation. ViviFire lets you identify deprecated elements in your code.
If you try to use a deprecated element, then the result is a compiler warning that you cannot easily ignore.
If you also supply a
message after the modifier, then it will show immediately after the standard warning.
This lets you give more information, for example, an alternative to the deprecated element.
Enum(all or only some elements)
- Procedures (
Struct(All or only some elements)
Library MyAPI @Deprecated Class foo ' ... End Class @Deprecated "Use baz as an alternative" Method bar ' ... End Method Method baz ' ... End Method