[m-dev.] proposal: extension to pragma obsolete

Peter Wang novalazy at gmail.com
Tue Sep 9 17:52:20 AEST 2014

On Tue, 9 Sep 2014 17:18:16 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> The main question I have is what should the second argument actually be.  There
> are three proposals below: (1) use a string literal, (2) use a list of string
> literals or (3) make (some of) the functionality of the error_util library
> available so we can mark up the warning messages.
>      (1) :- pragma obsolete(bar.baz/2, "Use predicate `bar.baz_to_int'/2 instead.").
>      (2) :- pragma obsolete(bar.baz/2, ["Use predicate",
>           "`bar.baz_to_int'/2 instead"]).
>      (3) :- pragma obsolete(bar.baz/2, [words("Use predicate"), sym_name_and_arity("bar.baz_to_int", 2),
>         words("instead.")]).

I think it's unnecessary, as a comment on the predicate declaration is
fine.  Otherwise my vote is for (1) literal string.


More information about the developers mailing list