Peter Niederwieser wrote: > Does the JVM specification allow special characters (e.g. space, > comma, question mark) in method names? I couldn't find a clear answer > in the document. I'm asking because the following works for me in > Groovy: > > class Foo { > def "JVM, anyone?" {} > } > > I've tried to call this method from Groovy (foo."JVM, anyone?"()) and > Java (using reflection), and both times it worked. It would be great > if I could use such method names in my Groovy-based DSL, but first I > need to know whether this is officially supported by the JVM.
I've been using special character names in Duby for operators. class MyInteger def +(other) # do something end end ...and the resulting Java class has a + method in it. When you add to that Duby's full compile-time reflective type inference, you can build a Ruby-like DSL using all the operators you'd expect (though as Neal G points out, not < or >). I really must get back to working Duby one of these days. - Charlie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---