map and fmap

John Meacham john at repetae.net
Thu Aug 17 16:37:20 EDT 2006


On Mon, Aug 14, 2006 at 12:00:25PM -0700, Iavor Diatchki wrote:
> As far as I understand, this was done to make it easier to learn
> Haskell, by turning errors like "Cannot discharge constraint 'Functor
> X'" into "X =/= List".  I am not convinced that this motivation is
> justified, although I admit that I have very limited experience with
> teaching functional programming to complete beginners. 

I think it is more because if you make too many things overloadable,
you get ambiguity problems. Having to annotate a bunch of terms with
type signatures is really anoying.

 Still,
> students probably run into similar problems with overloaded literals,
> and I think, that a better approach to problems like these would be to
> have a simplified "learning Prelude" for the beginners class, rather
> than changing the standard libraries of the language (writing type
> signatures probably also helps...)

I don't like the idea of a learning prelude. people should teach the
language outright otherwise students will end up confused. Better error
messages for compilers is the correct solution, not a watered down
version of the language. Once at caltech, they tried this experiment
where they took the beginning programming course taught in C, and
changed it to use 'java junior' a version of java for teaching, it was
an absolute disaster. the students ended up not being able to program in
java and not learning the basics of computer architecture that learning
C gives you (as well as the ability to program in C) and generally being
quite upset.

IMHO everyone should know both C and Haskell fluently. there is no point
dawdling in between the extremes. :)

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-prime mailing list