A little time with the Clojure source and a debugger has been illuminating.
In genclass.clj:gen-interface, the line: (let [options-map (apply hash-map options) results in this value for options-map: {:methods [[(quote foo) [] []]], :name mypkg.ICompileTest} It looks like "(quote foo)" is being taken as the literal string name, rather than evaluating to "foo". And it happens that the hex ascii in the generated method name translates to: [](quote foo). Seems suspiciously like a macro-time vs fn-time thing... I will submit an issue on this & see if I can work out a patch. On Jan 7, 10:39 pm, Greg Harman <ghar...@gmail.com> wrote: > I'm playing around with gen-interface, and compiled the following: > > (ns mypkg.compiletest) > (gen-interface :name mypkg.ICompileTest > :methods [['foo [] []]]) > > I then used a java .class decompiler to look at the resulting .class > file expecting to see an interface with a single method called "foo" > but instead I see this: > > package mypkg; > > public interface ICompileTest { > public abstract _5B__5D_ _28_quote_20_foo_29_(); > > } > > My questions: > 1. Why is the method name "_5B__5D_ _28_quote_20_foo_29_" instead of > "foo"? > 2. Why is the method abstract? I'm not aware of any meaning for the > abstract keyword in an interface - not that that means there isn't a > meaning... :-) > > -Greg --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---