Re: Can't type-hint a def with ^objects

2013-02-23 Thread Marko Topolnik
Thank you, I'm using it and it does work. However, there is presumably a good reason for the existence of the ^objects annotation, so the question remains whether this is a) specified behavior and b) the way it is planned to stay. On Saturday, February 23, 2013 10:32:31 PM UTC+1, Michael Klishi

Re: Can't type-hint a def with ^objects

2013-02-23 Thread Michael Klishin
2013/2/24 Marko Topolnik > I do need to avoid reflection. Then use ^"[Ljava.lang.Object;" and friends, it works just fine. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: Can't type-hint a def with ^objects

2013-02-23 Thread Marko Topolnik
Actually, ^doubles can be used for two separate things, one of which applies to ^objects as well: avoid reflection and avoid boxing/unboxing. I do need to avoid reflection. On Saturday, February 23, 2013 10:00:58 PM UTC+1, Michael Klishin wrote: > > > 2013/2/24 Marko Topolnik > > >> Is this beh

Re: Can't type-hint a def with ^objects

2013-02-23 Thread Michael Klishin
2013/2/24 Marko Topolnik > Is this behavior specified? It certainly doesn't make sense from a > language user perspective. ^doubles can be used to avoid boxing on the hot code path, what would you gain with ^objects? -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin --

Can't type-hint a def with ^objects

2013-02-23 Thread Marko Topolnik
user> (def ^doubles s) #'user/s user> (defn s ^objects []) #'user/s user> (def ^objects s) CompilerException java.lang.RuntimeException: Unable to resolve symbol: objects in this context, compiling:(NO_SOURCE_PATH:1) Is this behavior specified? It certainly doesn't make sense from a language u