Proposal: Add &&& and *** to Data.Tuple

Conal Elliott conal at conal.net
Mon Oct 15 16:39:15 EDT 2007


Maybe I've missed the essence of this discussion, but I seem to see to
opposite sentiments running through.  One is to create additional,
*specialized* (for "->") names for existing general arrow operators, rather
than using the generalized versions, citing simpler error messages.  The
other thread is regret over th Haskell 98 committee having done just this
kind of specialization (dumbing down) for monads vs lists.

My personal vote is for generality of the language & libraries, and address
the newbie issue with training-wheels prelude & libs or something like Jon's
"subsumes" proposal.

People may say that generality of functions like "first" & "second" is
unnecessary for their purposes.  Personally, I sometimes find that such
"unnecessary" generality leads me to discover that an idea I'm working on is
much more general (and therefore useful to others) than I'd originally
imagined.

I agree that the names "onFst" and "onSnd" are easier to interpret than
"first" and "second".  So let's use those names for the general (Arrow)
versions, rather than the specializations.

Comments?

Cheers,  - Conal

On 9/20/07, ajb at spamcop.net <ajb at spamcop.net> wrote:
>
> G'day all.
>
> Quoting Stefan O'Rear <stefanor at cox.net>:
>
> > The reason ++ and mplus is so similar is that they used to be the same;
> > (++) *was* the MonadPlus class member.  Cale Gibbard explains this as
> > {{{Quite a few people on the Haskell 98 committee had an irrational fear
> > of polymorphism.}}}
>
> That's a slight exaggeration.  They actually had nightmares involving
> trying to explain to their undergraduate students what the inevitable
> type error messages meant.
>
> At a time when Haskell was mostly a teaching/research language, this made
> a certain amount of sense.  Now that Haskell is officially Cool(tm), the
> argument is much weaker.
>
> Cheers,
> Andrew Bromage
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20071015/83685aec/attachment.htm


More information about the Libraries mailing list