[Haskell-cafe] Re: Why the Prelude must die
Arthur van Leeuwen
arthurvl at cs.uu.nl
Tue Mar 27 16:00:19 EDT 2007
On 27-mrt-2007, at 20:17, Nicolas Frisby wrote:
> Gut feeling: the quick'n dirty script case occurs far less than the
> whole module case. Thus I think the benefit of automatically importing
> the Prelude if the module declaration is omitted should not happen:
> the Principle of Least Surprise out-weighs the small benefit to a rare
> case.
In my experience quick'n'dirty scripts tend to end up as full-blown
modules
later on in their life. This, to me, is a strong indication to make
importing
the prelude explicit. Furthermore, the arguments against explicit
importing
seem to be easier teaching and shorter code, as one needs much of the
Prelude almost everywhere. However, Java seems to offer a reasonable
datapoint in this argument: almost everything in the language needs
to be explicitly imported, but for java.lang. Ofcourse, java.lang is
quite
annoyingly big... so a good example it is not.
> Regarding type variable naming, a few of my more hardware minded
> friends I've asked to try Haskell often tease me about the opaque type
> variable names in the Prelude--it seems greater consideration of type
> variable names in the Prelude might behoove new users.
Good point. It would also make the Prelude sources (and Haddock docs)
*much* easier to understand.
Doei, Arthur.
--
/\ / | arthurvl at cs.uu.nl | Work like you don't need
the money
/__\ / | A friend is someone with whom | Love like you have never
been hurt
/ \/__ | you can dare to be yourself | Dance like there's nobody
watching
More information about the Haskell-Cafe
mailing list