Sean Corfield writes:

> Sounds like Eastwood should ignore :arglists and just use the actual argument 
> lists for the arity check, with perhaps an additional lint warning for when 
> what's in :arglists doesn't match possible real signatures of the function? I 
> can see the latter being useful on its own sometimes.

There's no way other than inspecting :arglists to determine the
signature of a function.

Eastwood *could* add a pass to put the arg vectors of defn forms in an
atom and use that to check for wrong arities, but this would work only
for functions that get analyzed by tools.analyzer.jvm, this means that
it wouldn't report the warning for i.e. calls to a function from a
dependency.

To be honest I don't like the idea of libraries attaching not-valid
:arglists meta to Vars at all since the doc[1] for `def` says that :arglists
will be "a list of vector(s) of argument forms, as were supplied to
defn" and the clojure Compiler uses :arglists for type-hints handling.

[1]http://clojure.org/special_forms#Special%20Forms--(def%20symbol%20init?)%20


Nicola

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to