Re: Type hint Java array of your own Java class

2009-02-05 Thread Christian Vest Hansen
On Thu, Feb 5, 2009 at 7:33 AM, Christophe Grand wrote: > > Chouser a écrit : >> (defn foobar [#^#=(array-of MyClass) myarray]) >> >> Again, I apologize for even suggesting this > Wow what a clever (ab)use of reader macros! This is where a raptor jumps in from the left and eats someone :) > > -

Re: Type hint Java array of your own Java class

2009-02-04 Thread Christophe Grand
Chouser a écrit : > (defn foobar [#^#=(array-of MyClass) myarray]) > > Again, I apologize for even suggesting this Wow what a clever (ab)use of reader macros! -- Professional: http://cgrand.net/ (fr) On Clojure: http://clj-me.blogspot.com/ (en) --~--~-~--~~~---~--~

Re: Type hint Java array of your own Java class

2009-02-04 Thread Chouser
On Wed, Feb 4, 2009 at 6:22 PM, chris wrote: > > "#^#=" doesn't make any sense to me. Where did this come from? I already apologized twice, what more do you want from me!? As penance, I will try to explain. #^ is a reader macro, documented at http://clojure.org/reader #= is another reader ma

Re: Type hint Java array of your own Java class

2009-02-04 Thread chris
Sorry for jumping in, but "#^#=" doesn't make any sense to me. Where did this come from? Chris On Feb 4, 2:55 pm, Chouser wrote: > On Wed, Feb 4, 2009 at 12:49 PM, Christophe Grand > wrote: > > > David Nolen a écrit : > >> (defn foobar [#^MyClass[] myarray]) > > >> This syntax doesn't seem

Re: Type hint Java array of your own Java class

2009-02-04 Thread Chouser
On Wed, Feb 4, 2009 at 12:49 PM, Christophe Grand wrote: > > David Nolen a écrit : >> (defn foobar [#^MyClass[] myarray]) >> >> This syntax doesn't seem to work. > Indeed it's a bit tricky: > #^"[Lyour.package.YourClass;" > > You can find it by doing: > user=> (class (into-array [(your.package.Yo

Re: Type hint Java array of your own Java class

2009-02-04 Thread David Nolen
Many thanks. On Wed, Feb 4, 2009 at 12:49 PM, Christophe Grand wrote: > > David Nolen a écrit : > > (defn foobar [#^MyClass[] myarray]) > > > > This syntax doesn't seem to work. > Indeed it's a bit tricky: > #^"[Lyour.package.YourClass;" > > You can find it by doing: > user=> (class (into-array [

Re: Type hint Java array of your own Java class

2009-02-04 Thread Christophe Grand
David Nolen a écrit : > (defn foobar [#^MyClass[] myarray]) > > This syntax doesn't seem to work. Indeed it's a bit tricky: #^"[Lyour.package.YourClass;" You can find it by doing: user=> (class (into-array [(your.package.YourClass.)])) [Lyour.package.YourClass; Christophe -- Professional: http