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

The whole article hinges on the fact that the author seems to be unfamiliar with the term arity (?), which feels weird given they're clearly familiar with a number of programming languages etc. The definitions for unary, binary, etc are rather arbitrary and not how they're usually used.


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


Agree, 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.


> The whole article hinges on the fact that the author seems to be unfamiliar with the term arity (?)

how does it hinge tho?


"Unary" and "binary" were used exactly how they are used when talking about programming languages.




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

Search: