Thanks for sharing your experience. It seems there's one technique of
which you might not be aware. You can type-hint your defns, in
particular all the get-* accessors you have, and then not need to tag
every use.
(set! *warn-on-reflection* true)
(defn foo
"foo the thing into a string"
[x] (str x))
(let [f (foo 42)]
(. f (toUpperCase)))
-> Reflection warning, line: 67 - call to toUpperCase can't be
resolved.
(defn #^String foo
"foo the thing into a string"
[x] (str x))
(let [f (foo 42)]
(. f (toUpperCase)))
"42"
Also, type-hinting something on which you don't use member access (.)
is only useful for overload resolution, not performance. So declaring
#^PersistentHashMap data in render, and #float m etc in steer, does
nothing useful.
Combining these, I think the only type hint you would need would be
#^Graphics g in render.
Rich