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<Long> in
Java, what you get is more like a List<Object> that automatically
casts elements to Long when you retrieve them.
-Stuart Sierra
On May 28, 5:23 pm, tsuraan <tsur...@gmail.com> wrote:
> I have a java class whose constructor expects (among other things) a
> BlockingQueue<Long>.  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 just hints for the java compiler and not
> actually enforced by the runtime, which would imply that clojure has
> no need to support them.  Is that the case?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to