Welcome! Please see the About page for a little more info on how this works.

+1 vote
in Clojure CLI by

something i found counterintuitive recently is that clj -X passes in options as a symbols. so for example i have this function:
(defn test2 [opts] (println (type (:file opts))))
when i run clj like this:

-> clj -X some.package/test2 :file some-dir/file1

clojure.lang.Symbol

i would think it would be a string, so i'm curious why it's a symbol.

1 Answer

0 votes
by
selected by
 
Best answer

-X will edn/read-string each argument

...