map and fmap

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Mon Aug 14 15:55:29 EDT 2006


On 2006-08-14 at 12:00PDT "Iavor Diatchki" wrote:
> Hello,
> I never liked the decision to rename 'map' to 'fmap', because it
> introduces two different names for the same thing (and I find the name
> `fmap' awkward).

I strongly concur. There are far too many maps even without
that, and having two names for the same thing adds to the
confusion.

> 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.  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"

Agreed.

-- 
Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk




More information about the Haskell-prime mailing list