Re: Using generics

2009-05-29 Thread Stuart Sierra
As I understand it, generics aren't "real" types in the JVM. They don't even exist in the compiled bytecode instructions. They're more like casting hints to the compiler. When you write List in Java, what you get is more like a List that automatically casts elements to Long when you retrieve th

Re: Using generics

2009-05-28 Thread tsuraan
> user=> (show Class) > === public final java.lang.Class === > [ 0] static forName : Class (String) > [ 1] static forName : Class (String,boolean,ClassLoader) > [ 2] asSubclass : Class (Class) > [...] > nil > user=> (show Class 2) > # java.la

Re: Using generics

2009-05-28 Thread Stephen C. Gilardi
On May 28, 2009, at 5:23 PM, tsuraan wrote: I have a java class whose constructor expects (among other things) a BlockingQueue. It's easy to create a BlockingQueue in clojure (obviously), but I can't figure out the syntax to specialize it to the Long type. Is this possible, or does it even ma

Re: Using generics

2009-05-28 Thread Meikel Brandmeyer
Hi, Am 28.05.2009 um 23:23 schrieb tsuraan: I have a java class whose constructor expects (among other things) a BlockingQueue. It's easy to create a BlockingQueue in clojure (obviously), but I can't figure out the syntax to specialize it to the Long type. Is this possible, or does it even ma

Using generics

2009-05-28 Thread tsuraan
I have a java class whose constructor expects (among other things) a BlockingQueue. It's easy to create a BlockingQueue in clojure (obviously), but I can't figure out the syntax to specialize it to the Long type. Is this possible, or does it even make sense? I seem to recall that generics are j