KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to create a little Clojure macro that def s a String with a type hint: (defmacro def-string [name value] `(def ^String ~name ~value)) (def-string db-host-option "db-host") When I macroexpand it, the type hint is lost: (macroexpand '(def-string db-host-option "db-host")) ;=> (def db-host-option "db-host") Never mind the wisdom of type hinting this. Why is the macro losing the metadata? How do I write this macro, or any that includes metadata?
Tags (comma-separated)
Save Edits
Cancel