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

I like the following but again "+" denotes addition and not a general binary operation.
I personally often define the alias:
(<+>) = mappend
A lot of math books use "+" or "x" enclosed in a circle to indicate that the usual meaning of "+" nor "x" is intended for the meaning of the binary operation. I can't figure out if this would compile, the inside "()" representing a circle. ((+)) = mappend It would be easier for beginners to "grok".
I don't think so... but while we're at it, what's with that weird name "Monoid" anyway, let alone "Functor", "Monad", etc.? ;-)
Ivan: I had thought those were words expressing valid mathematical concepts. In order to find similarities between apparently different operations & data one wants to reason abstractly; similar to mathematics. -- -- Regards, KC

On 24 Jul 2011, at 19:19, KC wrote:
I like the following but again "+" denotes addition and not a general binary operation.
I personally often define the alias:
(<+>) = mappend
A lot of math books use "+" or "x" enclosed in a circle to indicate that the usual meaning of "+" nor "x" is intended for the meaning of the binary operation.
Er no. Both symbols have extremely precise meanings. $\oplus$ is the direct sum of two modules and $\otimes$ is their tensor product. Personally, I wish, given that an additive monad is a kind of monoid, that the names for the zero and addition operations for the two classes were the same. That said, I am not especially happy with mzero and madd, given that their implication, that the monoid is abelian, is generally false.
I can't figure out if this would compile, the inside "()" representing a circle.
((+)) = mappend
It would be easier for beginners to "grok".
I don't think so... but while we're at it, what's with that weird name "Monoid" anyway, let alone "Functor", "Monad", etc.? ;-)
Ivan: I had thought those were words expressing valid mathematical concepts.
In order to find similarities between apparently different operations & data one wants to reason abstractly; similar to mathematics.
-- -- Regards, KC
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Sun, 2011-07-24 at 19:29 +0100, Julian Porter wrote:
On 24 Jul 2011, at 19:19, KC wrote:
I like the following but again "+" denotes addition and not a general binary operation.
I personally often define the alias:
(<+>) = mappend
A lot of math books use "+" or "x" enclosed in a circle to indicate that the usual meaning of "+" nor "x" is intended for the meaning of the binary operation.
Er no. Both symbols have extremely precise meanings. $\oplus$ is the direct sum of two modules and $\otimes$ is their tensor product.
Well. Notation depends on branch. I've seen routinely used + as addition in Z_{2,3,...} - for example 2 + 2 = 0. For example λ have different meaning when you would say about exponential distribution/radioactive decay and different when you talk about wavelength. If you are using lambda calculus it have yet another meaning. And according to http://en.wikipedia.org/wiki/Lambda those are just 3 of many meanings. I've seen ⊕ used as binary operation when the other were already used before I learned that it may denote the direct sum. Regards
participants (3)
-
Julian Porter
-
KC
-
Maciej Marcin Piechotka