« Return to Thread: Inconsistent behaviour of assert/2

Re: Inconsistent behaviour of assert/2

by Günter Kniesel :: Rate this Message:

Reply to Author | View in Thread

Richard O'Keefe schrieb:

>
> 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.

Richard, Ulrich,

thank you for your comments and suggestions. Actually, the problem
is not one of those students who dumbly follow your instructions but
one of the students who use their mind to think ahead and do their
own experiments. The type of students that one really wants to have ;)

In particular, some students who saw assert/1 but also saw clause/2 simply
deduced that it would have been a consistent design to have an assert/2 and
immediately tried it out without bothering to consult a manual first.

So I don't think that staged introductions to Prolog would have really
prevented this happening. People like these guys will simply try out
their ideas and, I must say, I am happy they do.

Regards,
Günter
_______________________________________________
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