3 ms·
I am amazed that I somehow didn't use the word arity once in the email. That said, I don't believe I'm using the terms unary and binary wrong. "Unary" histori
by hwayne 2y ago
I am amazed that I somehow didn't use the word arity once in the email.
That said, I don't believe I'm using the terms unary and binary wrong. "Unary" historically meant "a math operation that takes one parameter" and "binary" meant "operation that takes two". An algebraic group, for example, is defined as a set and a binary operation that follows certain properties.
arity is a way of generalizing unary/binary to arbitrary parameters. It is equally correct to say that `+` is a binary operation and to say that it is a 2-arity operator. It's like how "nth power" generalizes "square" and "cube": "9 cubed" is the same as "9³".
- reichstein 2y agoAgree, other than that I wouldn't use "2-arity". Maybe "2-ary", but that's just "binary" written confusingly. It works for "n-ary". I'd rather say that a binary operator _has_ an arity of 2 or talk about the arity _of_ an operator.