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 Kevin Downey
- 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 user=> On Fri, Jan 16, 2009 at 9:56 AM, Greg Harman wrote: > > I think I may have found a

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

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

2009-01-16 Thread Greg Harman
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 made the same mistake in Java. More to the point, an exter

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

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