The two seem to be doing the same thing in Clojure. Which syntax is canonical?
(defn a ^int [] 4)
(defn b ^{:tag int} [] 4)
I hope it’s a since it’s shorter.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I only use
bwhen I need to include metadata other than just the tag. For example, when implementing a transient collection, I neededNote that it would be equivalent and perfectly acceptable to write
but I personally prefer the explicit map.