[Haskell-cafe] Better names for
Jon Fairbairn
jon.fairbairn at cl.cam.ac.uk
Fri Apr 24 09:31:16 UTC 2020
Olaf Klinke <olf at aatal-apotheke.de> writes:
>> > fmap f. If I could re-define Haskell from scratch, I'd probably
>> >name
>> > the Functor type class function 'map'
>>
>> As it was in Haskell 1.4
>
> That's interesting, I did not know this. Thanks for sharing. Are there
> any public records as to why the decision was made to re-name 'map' to
> 'fmap'? I can not find any mention in the Haskell98 report(s).
Sorry, I don’t know.
> There is a stackoverflow thread (#6824255) which mentions paedagogical
> reasons, simplifying error messages.
That is the reason that I remember, the problem being that it
makes sense to teach map on lists before teaching type classes,
so error messages mentioning classes were considered confusing.
I was against this, preferring that teaching should use a
specialised prelude, but this was rejected on the grounds that
teachers wanted to teach “the real language”. I still think this
was a mistake.
— Jón
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk
More information about the Haskell-Cafe
mailing list