🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3964

Re: Committed Choice

#3964
From: Chris Moss
Date: Thu, 23 Mar 1989 18:01
30 lines
2009 bytes
In article <1305@murtoa.cs.mu.oz.au> lee@munmurra.UUCP (Lee Naish) writes:
>As I understand it, the reason why the argument was lost was that *in
>DEC-10 Prolog* '->' is not compiled and is therefore much slower.  I
>don't know of any other Prolog system where this is the case.

Yes, this was one reason, but the other was to do with style.
You CAN make the program ugly by overuse of conditionals, destroying
the essential simplicity of the Horn Clause form; evidence: excessive
use of =.

>2) Making -> fail when the condition fails make -> without ; virtually
>  useless.  a->b is the same as once(a),b which is much more clear.  The

But certain widely distributed Prologs (Q..) don't include once, at least as
a compiled option. Your alternative thus includes a metacall.
I suspect the reason they don't is precisely because -> without ; is
exactly equivalent as you point out. You pays your money...

>5) What is cut meant to do inside a condition?  This is a great way to
>  break Prolog systems and when -> was defined the use or scope of !
>  inside contitions should have been restricted (the problem is that the
>  -> creates a choice point, ! removes it, then -> tries to cut back to
>  it).

Interesting. _That's_ why Richard didn't include -> in his metainterpreter!
In fact Quintus flags it as a compile-time error. We came accross that
a couple of days ago comparing a metacircular interpreter I was using
and Richard's (which incidentally has at least one bug in it).

Chris.
Technical Details
Message-ID: <744@gould.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!icdoc!cdsm
References: <11500012@hpldola.HP.COM> <733@gould.doc.ic.ac.uk> <1305@murtoa.cs.mu.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!icdoc!cdsm
From: cdsm@doc.ic.ac.uk (Chris Moss)
Newsgroups: comp.lang.prolog
Subject: Re: Committed Choice
Message-ID: <744@gould.doc.ic.ac.uk>
Date: 23 Mar 89 18:01:23 GMT
References: <11500012@hpldola.HP.COM> <733@gould.doc.ic.ac.uk> <1305@murtoa.cs.mu.oz.au>
Reply-To: cdsm@doc.ic.ac.uk (Chris Moss)
Organization: Dept. of Computing, Imperial College, London, UK.
Lines: 30