Feature #20
open
New keyword: obsolete
0%
Description
As standard library and functions or types that compose it aren't yet perfectly well designed, and name changes can be frequent, adding a keyword 'obsolete' (or any thing like this) could be a great help.
This keyword does nothing else than producing a warning during compile time, just to remember to not use this function.
A variation of this could be the keyword : obsolete(new_function)
With this, the compiler can produce a very useful warning, telling which function to use instead of this one.
The keyword could be inserted into function or type definition like this :
public define obsolete(new_function_name) [[ReturnType]]
old_function_name
(
...
) =
<function body>.
Or maybe better (as we can suppose that 'obsolete' functions or type are always public ones):
which made automatically this function public but obsolete.
Private function can always be easily renamed, so there is no need to mark them as obsolete.