Fork me on GitHub
#cljs-dev
<
2019-06-22
>
john16:06:32

;; clj
$ clj
Clojure 1.10.0
user=> (#(inc %) 1 2)
Execution error (ArityException) at user/eval3 (REPL:1).
Wrong number of args (2) passed to: user/eval3/fn--4
;; cljs 
$ clj -m cljs.main -c perc.core -re node -r
ClojureScript 1.10.520
cljs.user=> 
cljs.user=> (#(inc %) 1 2)
2
Bug?

john16:06:11

Sorta aligns with javascripts more permissive arity handling, but could lead to less portable code

mfikes16:06:28

In ClojureScript, arity warnings are generated at analysis time. Arguably the analyzer could catch the example above, but it doesn't.

mfikes17:06:47

Arity errors are also generated at runtime for multi-arity fns.