foldable flexible bridges (putting foldable+traversable in prelude) Re: Burning bridges

Oren Ben-Kiki haskell-oren at ben-kiki.org
Tue May 21 16:36:04 CEST 2013


On Tue, May 21, 2013 at 3:20 PM, Oliver Charles <ollie at ocharles.org.uk>
 wrote:

> As a Haskell beginner I actually found in confusing that once I'd learnt
> the prelude functions I had to learn more functions again to get to the
> generalised functions. I would have rather been taught the general
> functions in the specific frame of lists, and then show why the type
> signature is more general than one for lists
>
> - ocharles
>

Hear hear!

I am unclear why beginners can't be taught the same way as today, but only
giving examples where the data types are normal lists, and then in a more
advanced chapter saying "actually, mapM (or whatever) works on more data
types...".

That said, if 100% backward compatibility is an issue (isn't it always?
:-), perhaps having a *standard* "no training wheels" prelude would solve
the problem? Assuming it was trivial to switch to it in the cabal package
file and not in the sources themselves.

I know there is a whole bunch of prelude replacements, but that's the
problem - there is a whole bunch of them. As SPJ pointed out, the "burning
bridges" phrase was about switching to new libraries, not to a new
language/compiler. Would it be a "flexible bridge" if there was an official
community effort to create a standard prelude 2.0 file?

Oren.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130521/8bf7f787/attachment-0001.htm>


More information about the Libraries mailing list