Type hinting return value with ^ or :tag meta?

Viewed 4432

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.

2 Answers
Related