On Sat, Nov 29, 2008 at 6:26 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > OK... Is it a legitimate part of Clojure's public specification, or is > it something that is (even more) subject to change (than other things > in a young language)?
The double-colon keyword prefix is a specific and supported feature, I believe, introduced Jul 28, svn rev 962. Since this predates the last release, I assume the lack of documentation is a simple oversight. The details were posted to this group here: http://groups.google.com/group/clojure/browse_frm/thread/9cc9926de1bdb128 > I've read the whole book now, and the only other unexplained notation > I've found is "#=". This is part of the print-dup work related to AOT. It is new since the last release, and therefore not necessarily documented on the site yet. You can see why it's useful by comparing the output of print-dup on a sorted map vs. a hash map: user=> (print-dup (sorted-map :a 1 :b 2) *out*) #=(clojure.lang.PersistentTreeMap/create {:a 1, :b 2})nil user=> (print-dup (hash-map :a 1 :b 2) *out*) {:b 2, :a 1}nil You can see that #= provides a syntax that allows the reader to produce data structures that are duplicates of what was printed, preserving the exact same type. This differs from normal printing where all seqs print like lists and all maps print like hash-maps. The specific use and meaning of #=() and #<> changed a few times over the course of a few days. It settled down with #=() being produced exclusively by print-dup, so I don't know how complete the documentation will be for that. It's not meant for people to write or read it, really. #<> is used by 'print' to indicate expressions that cannot be read back in by 'read'. For example: user=> (java.util.Date.) #<Date Sat Nov 29 19:59:42 EST 2008> Hope that helps make sense of things, --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
