« Return to Thread: Inconsistent behaviour of assert/2

Re: Inconsistent behaviour of assert/2

by Richard O'Keefe :: Rate this Message:

Reply to Author | View in Thread


On Jun 28, 2009, at 6:20 AM, Günter Kniesel wrote:
> 17 ?- assert(a,b).
> false.
>
> 18 ?- listing(a).
> :- dynamic user:a/0.
>
> user:a.
>
> true.

For what it's worth, I tried this in two other Prolog
systems and got the same result.

What really puzzles me is why the students came up with
this misconception in the first place.  I mean, they'd have
seen examples of assert/1, but not examples of assert/2.

PLT Scheme has an interesting approach.  They've divided
the language into levels, and the initial teaching level
doesn't have very much.  You have to explicitly move to
a richer level.  If you are an expert coming to PLT Scheme
for the first time, expecting everything you know to be there,
it's a nuisance, but it sounds like a good way to protect
beginners from (some) accidents.


_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog

 « Return to Thread: Inconsistent behaviour of assert/2