4 ms·
> The Haskell Prelude is the default import into all Haskell modules, it provides an endless number of ways to shoot ourselves in the foot and historical cruft
by z1mm32m4n 11y ago
> The Haskell Prelude is the default import into all Haskell modules, it provides an endless number of ways to shoot ourselves in the foot and historical cruft that can’t be removed.
As someone who's only recently started using Haskell seriously, what are some items from this "endless" list of things? Coming from a Standard ML background, one thing about Haskell that I prefer is that the Prelude is so powerful on it's own; SML's set of top-level functions is pretty limited.
- nv-vn 11y agoYep, same here coming from OCaml. MLs seem a lot more conservative with their standard libraries. Actually, with OCaml there have been a ton of attempts at making the standard library larger (Extlib, Batteries, Containers, Core, etc.) which is pretty much the opposite of what people are doing with Haskell. I always end up midsing Prelude when I'm working in OCaml, so it feels weird to me that people would want to strip it down so much.
- JadeNB 11y agoI think the prevalence of articles like this one, about what's wrong with the Prelude, are exactly the reason for the impulse not to have such a big stdlib. If Haskell's were more modularised, then there wouldn't be this perpetual dissatisfaction with it (although, of course, there might be different dissatisfactions); you could just slice'n'dice it into the shape you wanted.