Sunil,

> I read in "Clojure in Action" book by Amit Rathore, that #^ associates
> metadata for the next form. He also mentions that it is deprecated. So what
> is the current way of doing it?
>
> Also, in code like this -
>
> (defn filenames-in-jar
> "Returns a sequence of Strings naming the non-directory entries in the JAR
> file."
> [#^JarFile jar-file]
>
> is it specifying that the type of the jar-file argument should be JarFile?
>
> Where can I find some more documentation and or examples about it?
The current way of attaching meta-data or type hints to vars is
through the ^ reader macro. So your example will look like this -

(defn filenames-in-jar
""
[^JarFile jar-file]
...)

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to