metadata reader macro

2012-01-01 Thread liulei
I write one function,example: (defn #^{:return String} shout [#^{:tag String} s #^{:tag String} s1] (.toUpperCase s)) The function has two parameters: s and s1, I hope the two parameters are both String type. But I run the command: (shout 1 2), the command print 1, why the command don't

Re: metadata reader macro

2012-01-01 Thread Stuart Sierra
Hi LiuLei, Clojure's type hints are just that, hints. They're only there to help the compiler emit more efficient bytecode without using Java reflection. They are not type declarations, and they are not enforced by the compiler. -Stuart Sierra clojure.com -- You received this message because

Re: metadata reader macro

2012-01-01 Thread Meikel Brandmeyer
Hi, Am 28.12.2011 um 10:32 schrieb liulei: I write one function,example: (defn #^{:return String} shout [#^{:tag String} s #^{:tag String} s1] (.toUpperCase s)) The function has two parameters: s and s1, I hope the two parameters are both String type. But I run the command: (shout 1