🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #936

recorda/3 etc.

#936
From: Ray Nickson
Date: Mon, 02 Jul 1990 20:06
39 lines
2550 bytes
I'm interested to know whether the use of the `Internal Database'
predicates (recorda/3, recorded/3, erase/1 etc.) of Edinburgh Prologs
is considered good programming.   The C Prolog User's manual says
`they are intended for more sophisticated database applications and
are not really necessary for novice users' (but doesn't say how an
application qualifies as sophisticated!), the Quintus manual says they
are for efficiency only.  The current SICStus prolog manual says
`[they] are primarily concerned with providing efficient means of
performing operations on large quantities of data.  Most users will
not need to know about these predicates.', and goes on to say they
allow separation of program and data: `Note the diference between this
facility and that provided by `assert/1' and related predicates: the
latter actually alter the running program.'

I just discovered these predicates, and thought they were a tidy way
of achieving just that separation.  I intended to use them for keeping
around `global' data (whatever the logical purity considerations, I
always seem to need to do this!) instead of using assert/1 as I
currently do; this use feels much less like self-modifying code than
does code using assert/1 and clause/2, and I don't have the niggling
worry about running into the grey area of modifying a
currently executing predicate.
 
Now I read in the (unreleased) SICStus 0.7 #BETA manual:
  The predicates described in this section were introduced in early
  implementations of Prolog to provide efficient means of performing
  operations on large quantities of data.  The introduction of indexed
  dynamic predicates have rendered these predicates obsolete, and the sole
  purpose of providing them is to support existing code.  There is no
  reason whatsoever to use them in new code.
Taken with the Quintus assertion that they are for efficiency only,
this sounds like a pretty strong deprecation of their use.

Opinions?

-rgn
--
Ray Nickson <Ray.Nickson@comp.vuw.ac.nz>                    + 64 4 721000x8145
                 "everything is alright when you're down"
Technical Details
Message-ID: <NICKSON.90Jul2160643@vuwcomp.comp.vuw.ac.nz>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!comp.vuw.ac.nz!nickson

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!comp.vuw.ac.nz!nickson
From: Ray.Nickson@comp.vuw.ac.nz (Ray Nickson)
Newsgroups: comp.lang.prolog
Subject: recorda/3 etc.
Message-ID: <NICKSON.90Jul2160643@vuwcomp.comp.vuw.ac.nz>
Date: 2 Jul 90 20:06:43 GMT
Sender: news@comp.vuw.ac.nz (News Admin)
Organization: Victoria University of Wellington, Wellington, New Zealand
Lines: 39