[Haskell-cafe] Why the Prelude must die
ajb at spamcop.net
ajb at spamcop.net
Sun Mar 25 00:59:26 EDT 2007
G'day all.
Quoting Jason Creighton <jcreigh at gmail.com>:
> Wouldn't this be a non-issue if the "map" in Prelude was fmap?
It would be a non-issue if a number of things were different, such
as if Data.Map were a Functor and "map" was the Functor map instead
of the list map.
Either way, it highlights at least two of the original complaints
about the Prelude:
1. It gobbles up names that people want to use.
2. It's not generic enough.
Incidentally, I disagree with one of the sentences in the OP:
"The Prelude was designed by extremely smart people and was
considered close to perfect at the time."
The first half is, at best, partly true.
Don't get me wrong, everyone who has added stuff to the Prelude over
the years was, I have no doubt, individually smart. But it would be
only partly correct to call it "designed". Rather, it was originally
consolidated from all of the Miranda-work-alikes of the late 80s, then
gradually added to as features (e.g. constructor classes) were addedto the
language.
As such, the Prelude is not a well-designed coherent whole, but rather
an eclectic mix of Miranda-isms and Gofer-isms.
I understand that we do need a common base language of functions, and
calling it "Prelude" is as good as ny other. But we don't miss
complex numbers being in the Prelude, and I suspect we wouldn't miss
other stuff getting moved out into modules either.
Cheers,
Andrew Bromage
More information about the Haskell-Cafe
mailing list