Article View: comp.lang.prolog
Article #4008Re: Re: Committed Choice
From: Pat Chkoreff
Date: Wed, 12 Apr 1989 02:37
Date: Wed, 12 Apr 1989 02:37
21 lines
1114 bytes
1114 bytes
Thanks for all the informative responses. I `lose'.
o If-then-else has some connotations which are logically bogus.
Cut doesn't pretend: it's metalogical and proud of it.
o The `filter' example:
p(X) :- g(X),( (f(X),!,fail) ; true) .
shows how the cut can be superior when you really need to get
zany.
o If-then-else is not appreciably more readable than cut: after
all, in both cases you're going to have a string of antecedent-
consequent pairs.
So I'll keep cuts in their place: down low in the system, and as scarce
as feasible. I like omnidirectional predicates when I can have them.
- Patrick Chkoreff
Technical Details
Message-ID:
<11500014@hpldola.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!hpfcdc!hpldola!patchReferences:
<11500012@hpldola.HP.COM>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!ncrlnk!ncr-sd!hp-sdd!hplabs!hpfcdc!hpldola!patch From: patch@hpldola.HP.COM (Pat Chkoreff) Newsgroups: comp.lang.prolog Subject: Re: Re: Committed Choice Message-ID: <11500014@hpldola.HP.COM> Date: 12 Apr 89 02:37:48 GMT References: <11500012@hpldola.HP.COM> Organization: HP Elec. Design Div. -ColoSpgs Lines: 21