Re:Clojure 1.3 First Impression (It's Fast)
by swannodette on Thursday September 30, 2010 @07:09AM
(#1742892)
Clojure supports the static from some perspectives and not from others pattern, you just have to go through the var. So even if an fn foo is declared ^:static, you can call #'foo instead so that you always get the latest version of the fn.
Not sure if that's a better or worse approach overall. It probably depends on the structure of your program. One nice feature was that the same function could be static from some perspectives and not from others--- to functions in the same compilation block it was static, but functions from outside that block that called it treated it as non-static, and would immediately get the new version if, say, that whole block were recompiled. That let you make the core code optimized by sticking it in one big compilation block, while not changing the normal dynamic Lisp semantics of the block when viewed from the perspective of any outside function.