Language change proposal

Bengt Kleberg Bengt.Kleberg@REDACTED
Fri Oct 24 10:59:06 CEST 2003


WILLIAMS Dominic wrote:
...deleted
> 2) Functions would be deprecated by adding an obsolete attribute that
>    would list obsolete functions in the same format as export/import:
> 
> -module(my_module).
> -export([a/1,b/2,c/3]).
> -obsolete([b/2]).
> 

the eiffel keyword ''obsolete'' has an argument that explains what 
alternatives there are, instead of the obsolete feature. perhaps 
somehting like this (yes, i know this makes it impossible to obsolete a 
whole slew of functions in one go. but see my second example for an 
alternative):

-module(my_module).
-export([a/1,b/2,c/3]).
-obsolete(b/2, "use c/2 instead").


moreover, eiffel can obsolete a whole class. which could be quite handy:

-module(my_module).
-obsolete("use my_other_module instead").


bengt




More information about the erlang-questions mailing list