[m-dev.] if-then goals

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Jul 24 16:56:17 AEST 2003


On 24-Jul-2003, Julien Fischer <juliensf at students.cs.mu.OZ.AU> wrote:
> The compiler currently has code for handling goals of the form (if A then B)
> or (A -> B).  However the code in the parser for handling these
> is commented out, with the reason being given that because the
> semantics for standard prolog (A -> B ; fail) are different from those
> for Mercury, (A -> B ; true) this is disallowed for the moment?
> 
> Is the "moment" up?  If so, can we enable support for goals of this sort?

I don't this "moment" should *ever* be up. I'd prefer that block of code
be deleted. In my eyes, the increase in confusion from omitting the else
branch code far outweighs the convenience of being able to express an
if-then-else with six fewer characters.

Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list