Share your thoughts in the 2021 Clojure Community Survey!

Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

^long type hints on let binding values don't do anything:

user=> (def x 1)


user=> (set! warn-on-reflection true)
user=> (let [w ^long x] (Long/valueOf w))
Reflection warning, NO_SOURCE_PATH:13:18 - call to static method valueOf on java.lang.Long can't be resolved (argument types: unknown).
user=> (let [w (long x)] (Long/valueOf w))

but clojure.string/index-of has at least two cases of them, and even if they did do something, there is no reflective code that would take advantage of those type hints.

1 Answer

0 votes
Reference: (reported by hiredman)