🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3138

Re: A Suggested Additional Predicate for Prolog

#3138
From: Chris Moss
Date: Tue, 22 Mar 1988 17:27
18 lines
1249 bytes
In article <10303@shemp.CS.UCLA.EDU> gast@CS.UCLA.EDU () writes:
>I suggest that back_retract would be useful for many applications.
>(Not mutually exclusive)
>    +) finding permutations
>    +) solving constraints
  etc.

David, you need to learn the style of programming in Prolog before
you make suggestions as to how to change it. Read one of the better
books: e.g. Sterling & Shapiro's "The Art of Prolog".
You will find that the use of data structures is almost ALWAYS
preferable to using assert and retract. e.g. write a list permutation
routine and compare the speed with one using assert and retract (any 
one, not just yours) -- the better the Prolog the bigger the
difference.
That's why nobody bothers to improve assert and retract (there are
other reasons too).
Chris Moss.
Technical Details
Message-ID: <237@gould.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!ukc!eagle!icdoc!ivax!cdsm
References: <10303@shemp.CS.UCLA.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!ukc!eagle!icdoc!ivax!cdsm
From: cdsm@ivax.doc.ic.ac.uk (Chris Moss)
Newsgroups: comp.lang.prolog
Subject: Re: A Suggested Additional Predicate for Prolog
Message-ID: <237@gould.doc.ic.ac.uk>
Date: 22 Mar 88 17:27:02 GMT
References: <10303@shemp.CS.UCLA.EDU>
Sender: news@doc.ic.ac.uk
Reply-To: cdsm@doc.ic.ac.uk (Chris Moss)
Organization: Dept. of Computing, Imperial College, London, UK.
Lines: 18