Re: More extensive (variable) style checking

Alan Baljeu <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
>    t :-
>       (   hello(X)
>       ;   world
>       ),
>       writeln(X).
>
>is considered something to warn about. This gives some warnings on the
>SWI-Prolog libraries. Most of them concern indeed ugly code, but not
>errornous. 


I find spurious information to be deleterious to development; I want to see no 

output if something proceeds as expected.  This way it's easy to spot 

anything unusual.

In this case, I like the plan, but suppose

world :-
    writeln('Oh, bother!'),
    throw('We don't know what went wrong, but it's not good.').

Then warning about X being a singleton is false.  Likewise if the later disjunct fails.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.