Newsgroups: misc.education,comp.lang.misc,comp.lang.logo,comp.lang.lisp,comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!cs.utexas.edu!news.sprintlink.net!mv!moreira.mv.com!alberto
From: alberto@moreira.mv.com (Alberto C Moreira)
Subject: Re: Wanted: programming language for 9 yr old
Distribution: inet
Message-ID: <alberto.456.0008D1B9@moreira.mv.com>
Nntp-Posting-Host: moreira.mv.com
Sender: usenet@mv.mv.com (Paul Hurley)
Organization: MV Communications, Inc.
Date: Wed, 4 Oct 1995 12:49:05 GMT
References: <43v5qb$sb8@blackice.winternet.com> <44c8fh$6m3@onramp.arc.nasa.gov> <44da7v$d0f@stills.pubnix.net> <44lmqs$pap@news.asu.edu> <44rapn$1cr@dsinc.myxa.com>
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
Lines: 98
Xref: glinda.oz.cs.cmu.edu comp.lang.misc:23281 comp.lang.logo:2136 comp.lang.lisp:19325 comp.lang.scheme:13875

In article <44rapn$1cr@dsinc.myxa.com> rgb@banjo.dsi.com (Randy Brown) writes:


>This is the second recommendation for Prolog in this thread.  I find this
>very disturbing in that it seems to suggest that predicate logic is
>somehow easier to understand than, say an imperative description, for our
>hypothetical nine-year-old.  I think this betrays a certain lack of
>empathy.  I've tried to show my little brother (13) a little predicate
>logic, and it's not basic.

><begin flame bait>

       Bait taken!

       There's different ways to look at it. While it's true that Prolog is 
       based on predicate logic, it is also true that predicate logic is
       one of the basic cornerstones of mathematical thought. You
       probably heard more than one people in this group advocating
       that predicate logic be taught to young children.

       But, more than predicate logic, Prolog is based on the splitting of
       one goal in subgoals, each of which is split in further subgoals,
       and so on, until the subgoals are elementary enough to be tackled
       by simple programming contructs. Programming in this style 
       teaches top-down thinking and a style of programming which I call
       "logical" (as opposed to "imperative" , "functional" or "object 
       oriented"). 

       One problem that's very apparent to many people who start with
       algorithmic languages is that they are very cumbersome to program
       anything non-numeric. The sort of things Prolog expresses would
       generate involuted programs if written in C++ or Pascal. For
       example, I once wrote an expert database system for plant
       classification that fit in less than 300 lines of Prolog. 

>In fact, predicate logic isn't more basic at all --- it's just a 
>restricted toy that we mathematicians find easy to play with.  As
>a formalization, it may or may not be vaguely close to the way
>we reason (watch developments in cognitave science) but it's usefulness
>is primarily in it's simplicity.  Mathematicians should not
>confuse simplicity with comprehensibility.
><end flame bait>

       The problem isn't either simplicity or comprehensibility, but to be able
       to formally state a theory which, barred pathological cases like those
       treated by Goedel's theorem, gives us a fair confidence that what we
       reason is formally correct. Programming isn't about cognitive science
       only, and isn't about just modelling what exists, but most and foremost
       being able to create worlds that don't exist. 

       The basic reason for predicate logic's existence is its usefulness as a
       basis for many mathematical theories. We have nothing else that
       simple that foots the bill, and the predicate logic model is relatively
       compact and can be applied to a wide range of modelling situations.

>I think it's much easier to explain imperative programming to
>a nine year old, because they already have some idea of what it means
>to follow directions. 

       It may be, and that was the prime idea when people created Fortran
       and Grace Hopper invented Cobol. But times change, and different
       problems appear. We now know that the imperative model can be
       very restrictive for non-algebraic applications; we also know that
       the first programming language a child or youngster learns molds
       his/her programming mind forever; and we have experimental
       results by researcher (for example, Seymour Papert) which seem to
       point elsewhere.

       I do agree with you that, all things considered, imperative languages
       should be taught early. My motives are mostly utilitarian, because
       imperative languages are so important to anyone who wants to make
       money out of programming. But I don't know if I agree that predicate
       logic shouldn't be taught at elementary level, or that Prolog isn't
       necessarily a good start.
       
>You can probably teach them an impure functional
>language like scheme (which still has some idea of step, then next step,
>without the necessity of destructive assignment).  But I think you'd
>have a hard time teaching them prolog, at least until they've had
>11th-grade geometry.

        If I had to choose between Prolog and Scheme, I'd take Prolog without
        a wink. If I had to take the functional road, I'd use ML rather than 
        Scheme; I find type inference too fundamental a tool not to have it.

        There was a book by Robert Kowalski, one of the creators of Prolog. 
        Trouble is, I read it 15 years ago and I don't remember anymore either
         its title or its publisher; maybe somebody reading this can complement
         it. This book explains the principles of logic programming, and rather
         than digging into the technicalities of the language, it explains 
         what logic programming is all about and gives plenty of examples.


                                                            _alberto_




