Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both set union and number addition are examples of monoids, a maths concept from the field of abstract algebra. So there is a maths abstraction that unites these ideas.


Uhh quick limiting thing here (although I agree that the addition symbol is fine): the existence of a unifying math concept alone does not justify using the "+" symbol. By that argument, notating permutation conjugation with a "+" is fine, but that would be a notational sin as the "+" operator is reserved for commutative operations.

However, with that disclaimer, noting that both operations form monoids and both are commutative justifies the "+".


Haskell doesn't use the + symbol for monoids, it uses <>.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: