[Haskell-cafe] Monoid wants a (++) equivalent
leimy2k at gmail.com
Tue Jun 30 14:42:12 EDT 2009
On Tue, Jun 30, 2009 at 10:04 AM, Bryan O'Sullivan <bos at serpentine.com>wrote:
> On Tue, Jun 30, 2009 at 9:50 AM, David Leimbach <leimy2k at gmail.com> wrote:
>> I actually worry that this will make people think, more incorrectly, that
>> Monoids are about appending stuff only.
> I think that adding a graphical operator as a synonym for mappend would
> actually help to address that, since the magic word "append" would no longer
> be nearly as common in source code, and that textual name certainly is
> (unhelpfully) suggestive of a specific semantics.
Yeah the textual name doesn't help one bit. Much like "return" confuses
folks in Monads. However, I think most people learn Haskell in stages where
++ is introduced as an append operation *before* they even
come across the term "Monoid". I feel that though this may have a
lesser degenerative impact on the newbie's ability to learn Monoids,
that it still contributes to the confusion a bit.
Then again, anyone who's had to deal with overloaded operators in any
language should learn never to assume anything about overloaded
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe