Possible minor bug in gen-class: method name character escaping?

2009-01-16 Thread Greg Harman
I think I may have found a minor issue with gen-class, but wanted to confirm with the group that I'm not just doing something stupid... (gen-class :name mypkg.foo :prefix :methods [[my-method [Object] Object]]) Results in the following method signature in the .class file:

Re: Possible minor bug in gen-class: method name character escaping?

2009-01-16 Thread Greg Harman
Ah, that'll do it. Thanks. On Jan 16, 1:02 pm, Kevin Downey redc...@gmail.com wrote: - is not a Java letter or digit so it is not allowed in java method names. http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8 user= (Character/isJavaIdentifierPart (int \-)) false

Re: Possible minor bug in gen-class: method name character escaping?

2009-01-16 Thread Matt Revelle
On Jan 16, 2009, at 2:46 PM, Greg Harman wrote: As I chew on this, a couple of things don't sit right with me regarding use cases: 1. IMHO gen-class should fail with an appropriate message/exception rather than trying to fix the signature. This is what the Java compiler would do if I

Re: Possible minor bug in gen-class: method name character escaping?

2009-01-16 Thread Greg Harman
2. If I want the Clojure functions that underlie the methods in the generated class used directly by my Clojure code as well (which I do), then I'm stuck having to either violate standard Clojure/Lisp function naming conventions in favor of Java-friendly naming or I have to write

Re: Possible minor bug in gen-class: method name character escaping?

2009-01-16 Thread Kevin Downey
On Fri, Jan 16, 2009 at 12:22 PM, Greg Harman ghar...@gmail.com wrote: 2. If I want the Clojure functions that underlie the methods in the generated class used directly by my Clojure code as well (which I do), then I'm stuck having to either violate standard Clojure/Lisp function naming