clojure-dev 2025-04-24

is there a technical reason why the function classes created by fn* don't track the number of arities they have?

Number of arities doesn't sound very useful. You probably rather want the list of different arity sizes that the function accepts. It is technically possible to encode that into AFns but likely wasn't needed at the time.

what is the underlying pain that motivated asking this question?

the pain of curiosity

under which i have suffered my entire life

and yes, i meant a list of the different arity sizes

a question in #clojure about arityexception made me wonder how hard it would be to track the arities of a function on something other than metadata

the underlying pain is, arityexceptions are unhelpful. they are the bare minimum necessary to indicate there's a mismatch between provided and expected arguments