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

Paul Bone paul at bone.id.au
Tue Sep 9 18:15:50 AEST 2014


On Tue, Sep 09, 2014 at 05:52:20PM +1000, Peter Wang wrote:
> 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.
> 

Oh, I should have said.  I agree with Peter 1 is best as it's the easiest to
use.  I also would find this useful.


-- 
Paul Bone



More information about the developers mailing list