joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
Candid 2019-05-28T02:43:19.009700Z

syntax-quote (`) actually resolves the symbol, while regular quote doesn't

Candid 2019-05-28T02:43:48.010Z

compare

(require '[joker.os :as os])
(println `os/t)

Candid 2019-05-28T02:44:02.010300Z

prints joker.os/t

Candid 2019-05-28T02:44:15.010500Z

(require '[joker.os :as os])
(println 'os/t)

Candid 2019-05-28T02:44:24.010800Z

prints os/t

Candid 2019-05-28T02:46:09.012100Z

that's why qualified symbols inside syntax-quote "use" required namespaces

Candid 2019-05-28T02:47:08.012800Z

so the former doesn't trigger "unused namespace" warning while the latter does

borkdude 2019-05-28T07:33:55.013600Z

it will still work when it can’t be resolved though, but you’re right, when it’s there, it is used:

user=> (defmacro foo [] `foo/includes?)
#'user/foo
user=> (macroexpand '(foo))
foo/includes?
user=> (require '[clojure.string :as foo])
nil
user=> (macroexpand '(foo))
foo/includes?
user=> (defmacro foo [] `foo/includes?)
#'user/foo
user=> (macroexpand '(foo))
clojure.string/includes?