Thanks for your reply :)

The context: I am developing a wrapper generator that takes a Java
class and generates a Clojure wrapper, with a function for each method
etc. The purpose is to have nice wrappers, so your code is "cleaner"
as with all that Java calls. And it can ba a basis for more convenient
wrappers.

The generation of normal functions is easy but there is one case that
causes me some trouble: If there are methods that are static and non-
static with the same name and parameter count. So my first thought was
to define a multimethod, depending on the first parameter (which has
to be an instance of the class in case of non-static) with variable
number of args together with two macros, one for a static method call
and one for a simple method call, that take that variable arglist and
expand to the right call.

But I don't need the macros! Five minutes ago, I didn't know that
multimethods can have multiple function-bodies (and therefore multiple
different parameter lists). So I can generate the code for all
possible parameter lists without a variable "& args" parameter and
without the macros. Will be simple :)

-- 
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

Reply via email to