Drastic Prelude changes imminent
Herbert Valerio Riedel
hvr at gnu.org
Sat Jan 31 09:57:04 UTC 2015
Hello Mark,
On 2015-01-31 at 07:18:53 +0100, Mark Lentczner wrote:
[...]
> The value of generalizing the list functions greatly over estimated:
> There have been alternate, more generalized Preludes for ages... and I
> don't see much use of them. Sure, they require some futzing with
> imports to use - but that isn't that high of a bar, and yet clearly
> their value rarely merits it in people's minds.
* alternative (even more) generalised preludes exist
* there isn't much use of them
* the inconvenience of using them outweights their benefit
-----------------
-> the value of generalising list functions is greatly over-estimated
If I get your argument right (please correct me if I got it wrong), I'm
not convinced the argument to be valid.
IMHO it's rather a chicken-and-egg problem, that nobody wants to waste
time basing their project on some shaky experimental alternative prelude
which replaces `base` with no guarantee of future support/stability. And
the less users an alternative prelude has, the less there's incentive to
keep it supported/maintained. Also, if it's an experimental/research
prelude, chances are it's still evolving and changing in incompatible
ways. Another reason not to trust your project with it.
Finally, I'd rather interpret the argument to mean that alternative
preludes fail as a means to provide any meaningful feedback for
design-choices due to lack of use by a representable sample of users.
Otoh, the FTP-changes were continuously tested against packages on
Hackage to get empirical feedback on their impact, and if needed tweak
the design to have the most compatibility while achieving the goal of
making Foldable/Traversable more of a first-class citizen[1]. That's
probably more due diligence than any other alternative generalising
preludes can produce.
> Maybe I don't write the most clever code (code golf excepted), but I
> rarely pine for a more generalized length. Or for all to work over
> Foldable... etc. For the few times when I need something like
> Foldable I don't see what the issue is with importing qualified and
> using prefixes. People here seem to feel that a "F." is somehow an
> ugly wart on their code... but that is just the way it is with most
> software: You need a lot of things in scope, you use namespaces of one
> sort or another.
[...]
[1]: IMO, we either endorse the Traversable/Foldable abstraction as a
recommended abstraction for Haskell code by making it a properly
integrated first-class citizen (and integrating it in a future
Haskell Report), or we deprecate it (and eventually remove it from
`base` altogether, as what's its right to exist there
otherwise?). The current situation in `base` doesn't give a clear
picture about whether Foldable/Traversable is recommended or
rather an historic artifact, IMO.
Cheers,
hvr
More information about the Libraries
mailing list