> But name is multiply evaluated. This might be preferable:
Hi John,
Could you explain this a bit more for me? I can understand if the
condition is duplicated that is unnecessary calculation but don't
appreciate the issue with the binding name... both versions of the
macro seem to expand to identical code:
user=> (macroexpand-1 '(while-let [a nil] (foo)))
(clojure.core/loop [] (clojure.core/let [a nil] (clojure.core/when a
(foo) (recur))))
So my naive view was they would have identical behaviour/performance.
I've heard this come up before but never understood or been able to
find any reference about this 'issue'.
Regards,
Tim.