Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcvax!ukc!edcastle!aiai!jeff From: jeff@aiai.uucp (Jeff Dalton) Newsgroups: comp.lang.misc Subject: Re: Which language to teach first? Message-ID: <741@skye.ed.ac.uk> Date: 16 Aug 89 13:52:57 GMT References: <2584@aplcen.apl.jhu.edu> <6226@hubcap.clemson.edu> <1304@batserver.cs.uq.oz> Sender: news@aiai.ed.ac.uk Reply-To: jeff@aiai.uucp (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 62 In article <1304@batserver.cs.uq.oz> paul@batserver.cs.uq.oz writes: >The answer is quite clear: a modern-style functional language: Miranda (TM), >Haskell (when it appears), or even Hope. This is because Clear, you say? > * intro. courses are about establishing both a vocabulary > and a mind-set Good point, although sometimes they're about changing mind-set. (Think of all those students who've used some losing Basic.) However, the problem with mind-sets is that it's hard to settle a disagreement at that level. Not everyone prefers the functional + formal methods approach, and what can you say to them except that you think the functional apporoach will prove more effective in the end? You could point to more specific things, but then you'd have to say why those things are important. > * functional languages are more expressive (in a sense) than > procedural languages (ie better for presenting a vocab.) I'm not sure which sense you mean, especially since a functional language might just be a subset of a procedural one (think of standard ML, for example, or Lisp). > * functional languages admit simple formal proofs, allowing > the establishment of a pro-formal methods mind-set (such > as encouraged by Dijkstra's SIGCSE paper) Unfortunately, the formal methods mind-set can lead to something like this: Don't use programming language constructs that make formal methods difficult. And then some one can ask: If formal methods are so wimpy, why should that be my problem? > * there is at least one superlative text book: ``Introduction > to Functional Programming'' by Richard Bird and Phil Wadler > (Prentice-Hall). > > ANYONE WHO HASN'T READ IT JUST ISN'T SUFFICIENTLY INFORMED > TO EVEN BEGIN TO DEBATE THE ISSUE OF WHAT SHOULD BE AN > INTRO PROGRAMMING LANGUAGE (seriously!) Well, I've read it. I think it's a good text, but it has a problem shared by other functional texts, namely that the most complex (I'm not sure that's the right word, but it will do) programs in the book are still fairly trivial ones. I suspect that the people who like this book will be those who find the mathematics of programming interesting in itself. There are more interesting programs in other texts, such as Abelson and Sussman's _Structure and Interpretation of Computer Programs_. And I think you'll find that preference for one sort of book or the other splits on more or less ideological (what people sometimes call religious) lines. -- Jeff