Subject: Re: Modules

From: "Richard A. O'Keefe" <[email-masked]>
Date: Mon, 12 Jun 2000 10:33:32 +1200 (NZST)

On Fri, 09 Jun 2000, Lalit Jain wrote:
	>that so?
	
Jan wrote:
	Because the system remembers which clauses come from which file.  If a
	file is reloaded, all clauses resulting from the previous load will be
	removed.
	
And *that* is because consult(F) = [F] is really reconsult(F) = [-F].
The original idea in DEC-10 Prolog was that
 - consult was what you used to load a file in the first time
 - reconsult was what you used to load a *corrected* file in later times
Now if you make some corrections, it's obvious that
 - new predicates should come in
 - changed versions of old predicates should replace the old versions
But what about predicates that *used* to be in the old version of the
file but aren't there any more?  The eventual decision was that when
you reconsult a file F, that should wipe out _everything_ that came from
F, and then proceed as if loading F for the first time.

For various reasons, the two got merged.  So now the effect of consult(F) is
 - first, abolish all predicates previously defined in F (if any)
 - then load (new) definitions from F.
The original version of consult/1 made it easy to have clauses for the
same predicate in several files at the same time, but then made it very
hard to fix them.  The merged version made it impossible, so :-multifile
was added to restore that possibility.