« 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

I'm not being picky.  I have a lot that I need to learn
about how students think.

On Jul 1, 2009, at 4:22 AM, Günter Kniesel wrote:
> 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

But how would it be consistent?  There isn't any
clause/1!  This is like saying "I see a bathtub with two
taps and one plughole, so I expect to find a second plughole
if I look hard enough."

Since
?- help(clause).
?- help(assert).
would have told them instantly what versions of clause/N
and assert/N were available, this should have been cleared
up pretty quickly.

These students who go and try things, do they try SWI's
very nice on-line documentation as part of their exploration?
If not, what could be done to make it more attractive to them?

By the way, I use R a lot.  And the on-line help in R
is done by typing, for example,
        ?lm
to get help about the lm function.  So I find myself
typing things like
        ?open
at Prolog a lot.  That doesn't work because there's a missing
full stop, but I can fix that on the next line.  Or I could
if ? were suitably defined.  So my ~/.plrc contains these
two lines:

        :- op(999, fy, ?).
        ?(Topic) :- help(Topic).

after which
        ?clause.
        ?assert.
work.

If you don't use R (or S) much, this may not do anything
for you, but it has saved me a lot of frustration.

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