Article View: net.lang.prolog
Article #673Re: "assert" considered harmful?
From: Jamie Andrews
Date: Fri, 06 Jun 1986 17:35
Date: Fri, 06 Jun 1986 17:35
17 lines
1503 bytes
1503 bytes
I would say that if your only interest in Prolog is as a programming
language with neat features like backtracking and logic variables, then
by all means go ahead and use "assert" and "retract". Just be aware of
how they affect the control flow in the program.
It should be of little concern to applications programmers that
these features destroy the declarative reading of the program, unless they
have to prove to their bosses that their applications are rigourously
correct. However, there are ways of implementing global variables and
assert-and-retract-like behaviour in a completely declarative setting;
see Shapiro's papers about concurrent Prolog and message-passing. (The
object-oriented approach Shapiro advocates also explains I/O nicely.)
--Jamie.
...!seismo!ubc-vision!ubc-cs!andrews
"I believe in Santa Claus, and the DoD believes in Ada" -D.Parnas
Technical Details
Message-ID:
<269@ubc-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!mcnc!unc!ulysses!burl!clyde!cbosgd!ihnp4!alberta!ubc-vision!ubc-cs!andrewsReferences:
<1754@utai.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!mcnc!unc!ulysses!burl!clyde!cbosgd!ihnp4!alberta!ubc-vision!ubc-cs!andrews From: andrews@ubc-cs.UUCP (Jamie Andrews) Newsgroups: net.lang.prolog Subject: Re: "assert" considered harmful? Message-ID: <269@ubc-cs.UUCP> Date: Fri, 6-Jun-86 13:35:31 EDT Article-I.D.: ubc-cs.269 Posted: Fri Jun 6 13:35:31 1986 Date-Received: Wed, 11-Jun-86 06:24:33 EDT References: <1754@utai.UUCP> Reply-To: andrews@ubc-cs.UUCP (Jamie Andrews) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Lines: 17