Re: The Da Vinci Code.
- From: Evan Kirshenbaum <kirshenbaum@xxxxxxxxxx>
- Date: Thu, 23 Mar 2006 07:44:24 -0800
Matthew Huntbach <mmh@xxxxxxxxxxxxxx> writes:
On Wed, 22 Mar 2006, Evan Kirshenbaum wrote:
Matthew Huntbach <mmh@xxxxxxxxxxxxxx> writes:
The theory was wildly over-optimistic, and made claims about the
Prolog language which just don't stand up in practice. My
experience with it is that you only learn to program properly in
it when you start thinking about how it actually works.
No argument there, on any count. But if you want to teach
beginners to use it at a novice level, that's the way you have to
get them to approach it. And it's a really difficult language to
write in if your model of programming is Fortran (or C or Pascal or
Java or ...)
The whole *point* of Prolog was that it was meant to by *easy* for
novices, because it was based on a human notation, logic, and not on
how machines work. But it didn't seem to work out that way, mostly
because most humans seem to find recursion difficult to grasp, even
if they haven't already been brain danaged by exposure to Fortran
etc.
I disagree that the way to get novices into Prolog is to suggest it
all works by magic. In my experience that just leads to more
confusion. In practice I think you have to give them early on a
feeling for it on an operational level.
I don't think either of us were suggesting to tell them "it all works
by magic". You have to (pretty early) explain backtracking and the
basics of logic variables. But I'd expect that you can get a fair
ways without worrying about things like cuts (at any deep level),
database assertions and memoization, the nitty-gritty details of term
unification, clause indexing, pulling terms apart, disjunction, and
the like.
You can find the notes I used for teachingh Prolog years ago on:
http://www.dcs.qmw.ac.uk/~mmh/AINotes/
I don't think I would have started with square as my first example,
since that gets people started thinking of clauses as being
unidirectional (square(X, 25) will simply fail). Of course, when you
get experienced, you realize that most clauses *are*, in fact,
designed to be used in one direction, but at the beginning I would
have stressed that in Prolog that isn't necessarily the case.
--
Evan Kirshenbaum +------------------------------------
HP Laboratories |There are two types of people -
1501 Page Mill Road, 1U, MS 1141 |those who are one of the two types
Palo Alto, CA 94304 |of people, and those who are not.
| Leigh Blue Caldwell
kirshenbaum@xxxxxxxxxx
(650)857-7572
http://www.kirshenbaum.net/
.
- Follow-Ups:
- Re: The Da Vinci Code.
- From: Matthew Huntbach
- Re: The Da Vinci Code.
- References:
- The Da Vinci Code.
- From: irwell
- Re: The Da Vinci Code.
- From: Will
- Re: The Da Vinci Code.
- From: Steve Hayes
- Re: The Da Vinci Code.
- From: Matthew Huntbach
- Re: The Da Vinci Code.
- From: Steve Hayes
- Re: The Da Vinci Code.
- From: Django Cat
- Re: The Da Vinci Code.
- From: Laura F. Spira
- Re: The Da Vinci Code.
- From: Django Cat
- Re: The Da Vinci Code.
- From: Charles Riggs
- Re: The Da Vinci Code.
- From: Chris Malcolm
- Re: The Da Vinci Code.
- From: Charles Riggs
- Re: The Da Vinci Code.
- From: Evan Kirshenbaum
- Re: The Da Vinci Code.
- From: Matthew Huntbach
- Re: The Da Vinci Code.
- From: Evan Kirshenbaum
- Re: The Da Vinci Code.
- From: Matthew Huntbach
- The Da Vinci Code.
- Prev by Date: Re: How to type letter "é"?
- Next by Date: Re: OT: Teatime
- Previous by thread: Re: The Da Vinci Code.
- Next by thread: Re: The Da Vinci Code.
- Index(es):
Relevant Pages
|