lazy-require
lazy-require copied to clipboard
Are macros implicit args correctly handled?
At least on my machine the following code
(lreq/with-lazy-require [[clojure.core.async :as async]]
(async/go 1))
produces the following error:
Wrong number of args (1) passed to: clojure.core.async/go
which can be worked around with:
(lreq/with-lazy-require [[clojure.core.async :as async]]
(async/go nil nil 1))
as macros actually take two more implicit arguments: &env and &form.
Addendum: @alexander-yakushev would you accept PR for this?
Hello @piotr-yuxuan. The biggest problem is that macros must be expanded in compilation time. Hence, you cannot really postpone the loading of a namespace if you need any macros from it.