Re: removing the largest item from the list
From: Matthew Huntbach (mmh_at_dcs.qmw.ac.uk)
Date: 03/16/04
- Next message: Matthias Hahn: "Re: newby question - once more solitaire - infinite loop?"
- Previous message: seguso: "Re: Where is Mercury's type inference?"
- In reply to:(deleted message) anders t: "Re: removing the largest item from the list"
- Next in thread: seguso: "Re: removing the largest item from the list"
- Reply: seguso: "Re: removing the largest item from the list"
- Reply: Andrzej Lewandowski: "Re: removing the largest item from the list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Mar 2004 10:06:11 GMT
anders t wrote:
> Quoting Matthew Huntbach in comp.lang.prolog:
>>Or are you suggesting that people who teach Prolog do so in a way different
>>from people who teach other sorts of programming? If so, I don't see any
>>evidence of that. My experience of teaching any sort of programming is that
>>students need to be encouraged to think through it themselves and that
>>sometimes if they are show answers too early they never properly learn how
>>to program.
> While I, also in general, certainly agree that practical assignments is
> must in order to really learn, I must still highlight that the problem is
> that Prolog really is something new to anyone who has never dealt with
> declarative programming or, for that matter, heavy list programming.
>
> We don't seem to get the time to let things mature. Especially in a
> combined AI/Prolog course we get 3-6 hours to learn how Prolog (I guess
> generally, declarative programming) works and then we are supposed to be
> off with solving (simpler) AI problems.
>
> How many students start solving (simpler) AI problems or equivalents in OO
> programming after three hours of learning Java as a first OO language?
> There will of course always be geniuses who handle this perfectly, but
> geniuses alone can't support the Software market with the manpower needed.
Prolog is a very simple language. There isn't a huge amount of syntactical
constructs to master. The basics of Prolog programming *can* be put across
very simply in a few hours. After that, what else is there to do but to go
through examples, and my experience is that going through examples by doing
them yourself is the only way to really learn. In a language like Java there
are a lot more constructs to learn - you have to explain variables, then the
procedural structures, then methods, then objects, them inheritance.
Obviously this is going to take longer than it takes to explain the little
bit of syntax and operatonal behaviour that is all Prolog is. So I think
learning Prolog is better compared to learning just one aspect of Java. For
example, the basic control flow aspects of Java should certainly be
learnable to the point where students would be expected to solve siple
problems in them in the space of 3-6 hours.
> Perhaps our brains are indeed destroyed by functional programming, but
> that's just another incentive to be more gentle with us students, in order
> to not repel us from Prolog/Declarative programming.
When you say "functional programming" I assume you actually mean "procedural
programming", since functional programming is another form of declarative
programming. Perhaps it depends on how you have been taught programming
previously. Many people seem to find recursion incredibly difficult to
handle, and this is the basis for them finding Prolog difficult since in
Prolog you can't escape from using recursion. But recursion can be taught in
other languages. When I teach Java, I give my students a simple list
abstract data type, and get them to write simple-list handling programs
similar to those one would write in Prolog. I'd expect them to be able to do
this after a few hours teaching them about lists and recursion, so I don't
see that as much different to what you say about learning Prolog.
> Also, it isn't helping us students that Prolog is diversified between
> (competing(??) implementations.
In what way? The basics of Prolog do not alter between the various
implementations, and surely its these basics that a novice Prolog programmer
is going to be dealing with. I would not expect the sort of programs a
novice Prolog programmer would write to be any different no matter what
implementation is being used.
> Noone has still not really answered my now (in)famous question (a bit
> rephrased):
>
> Is there a true interest among Prolog theoreticists and practitioners to
> popularize Prolog and perhaps make it a mainstream language, like Java,
> C++, C#, or is there a desire to protect a territory? (I'm not necessarily
> saying that the latter would be something bad, I just want to establish an
> understanding.)
No, clearly not. How on earth would it serve anyone who wants to promote a
language to deliberately try and put people off it? What a ridiculous point
you are making here.
I don't think Prolog is competing to be a mainstream language
because I think it has flaws that mean it can't be. It has been around a
long time, and it's a tribute to its very simple elegant design that it
hasn't changed much since first introduced and all attempts to introduce
more complex but "better" logic languages haven't really succeeded. However,
I don't think it really scales up to what is required to produce large scale
software for modern computing systems. So I think it's something best taught
as an interesting idea that helps get you thinking and is worth a few hours
on the curriculum, rather than as a major topic you are going to need to
become a real expert in and spend many long hours learning.
Matthew Huntbach
- Next message: Matthias Hahn: "Re: newby question - once more solitaire - infinite loop?"
- Previous message: seguso: "Re: Where is Mercury's type inference?"
- In reply to:(deleted message) anders t: "Re: removing the largest item from the list"
- Next in thread: seguso: "Re: removing the largest item from the list"
- Reply: seguso: "Re: removing the largest item from the list"
- Reply: Andrzej Lewandowski: "Re: removing the largest item from the list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|