[Haskell-cafe] For class Monoid; better names than mempty & mappend might have been: mid (mident) & mbinop

Gábor Lehel illissius at gmail.com
Mon Jul 25 09:50:06 CEST 2011


On Mon, Jul 25, 2011 at 9:35 AM, Thomas Schilling
<nominolo at googlemail.com> wrote:
> On 25 July 2011 08:22, Paul R <paul.r.ml at gmail.com> wrote:
>> Hi Café,
>>
>> Thomas> I think (<>) is fairly uncontroversial because:
>> Thomas> (...)
>> Thomas> 2. It's abstract. i.e., no intended pronunciation
>>
>> How can that be an advantage ? A text flow with unnamed (or
>> unpronounceable) symbols makes reading, understanding and remembering
>> harder, don't you think ? I really think any operator or symbol should
>> be intended (and even designed !) for pronunciation.
>>
>> Some references state that the monoid binary operation is often named
>> "dot" or "times" in english. That does not mean the operator must be
>> `dot`, `times`, (<.>) or (<x>) but at least the doc should provide
>> a single, consistent and pronounceable name for it, whatever its
>> spelling.
>
> Well, in this case I think it can be beneficial because the
> pronunciation depends on the underlying monoid.  E.g., sometimes it
> would be "append" or "plus", other times "dot" or "times".  It can, of
> course, be useful to also have a good name for the generic operator.
> In this case I'd call it "diamond".

After a big, backwards-incompatible library overhaul it would be nice
if it ended up being (++) or (+).

>
> --
> Push the envelope. Watch it bend.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Work is punishment for failing to procrastinate effectively.



More information about the Haskell-Cafe mailing list