clojure-dev

niwinz 2022-11-08T13:00:28.849999Z

Just a curiosity, I have seen in clojure source the ^:once metadata many times, what is real purpose of it?

Alex Miller (Clojure team) 2022-11-08T13:04:16.205159Z

It’s a hint to the compiler that this object will be used once and then the reference can be cleared

ghadi 2022-11-08T13:05:24.548299Z

(the object being the fn, and the references being the things that the fn closes over)

niwinz 2022-11-08T13:06:11.468909Z

aha, understand, thanks!