[Haskell-cafe] Re: [Haskell] Another First course in Haskell

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Wed Aug 27 11:13:58 EDT 2008

Neil Mitchell wrote:

>> If you want to program Haskell, get the basics sorted. Once you have
>> sorted the basics of functional programming, you can move on to the
>> Haskell specific bits. The course I learnt from at York left out
>> things such as modules, type classes (beyond slight Eq/Ord
>> signatures), monads, IO (other than interact) and anything not in
>> Haskell 98. 

I think what you describe as "basics" is "basics of programmning"
(i.e. how to write one "toy" function) and sure this is important.

But I think the other topics (modules, classes, monads, extra libraries)
are equally important because they are "basics of software engineering"
(how to write/organize a bunch of functions that do some "real" work).

I wouldn't call these "Haskell specific" because the underlying concepts
are perfectly general  - and if you leave them out,
students will ask for them because  they already know
Java has a module system, and interfaces, etc.
and they have been trained early to use this
(this is basic undergraduate CS stuff, no?)

Perhaps you're saying that *because* students already know that,
one shouldn't spend too much time on it in a Haskell course.
Agreed, but then my conclusion is to  use e.g. (hierarchical) modules
right from the start.

I generally tell my students that Haskell has about everything
you would expect from a modern general-purpose programming language
(that's where I'd put modules, classes, libraries)
*plus* additional benefits: more efficiency (in writing - you need
less code because you have more ways of abstraction)
and more safety (because of strong typing).

This does not contradict what you write.
Indeed one can practice abstraction and typing rules
using functions over lists of lists of ints.
Problem is that afterwards, the student knows about
functions and types but still has to unlearn the habit
of coding everything as lists of lists of ints...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080827/0fbe14a7/signature.bin

More information about the Haskell-Cafe mailing list