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

Thomas Schilling nominolo at googlemail.com
Mon Jul 25 09:35:50 CEST 2011


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".

-- 
Push the envelope. Watch it bend.



More information about the Haskell-Cafe mailing list