<!--
RSS generated by JIRA (4.4#649-r158309) at Wed May 22 09:13:25 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+10010+AND+labels+%3D+reader&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+10010+AND+labels+%3D+reader</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="10" total="10"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJ-1146] Symbol name starting with digits to defn throws &quot;Unmatched delimiter )&quot;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1146</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When trying to use an invalid symbol name when defining a function, the error message thrown is a confusing and wrong one. The error message is &quot;RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)&quot;, which unfortunately is the only message seen in nrepled emacs.&lt;/p&gt;

&lt;p&gt;$ java -jar clojure-1.5.0-RC2.jar&lt;br/&gt;
Clojure 1.5.0-RC2&lt;br/&gt;
user=&amp;gt; (defn 45fn [] nil)&lt;br/&gt;
NumberFormatException Invalid number: 45fn  clojure.lang.LispReader.readNumber (LispReader.java:255)&lt;br/&gt;
[]&lt;br/&gt;
nil&lt;br/&gt;
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)&lt;/p&gt;

&lt;p&gt;Expected:&lt;br/&gt;
When trying to (defn or (def a thing with a non valid symbol name, the last thrown error message should be one stating that the given symbol name is not a valid one.&lt;/p&gt;</description>
                <environment>$java -jar clojure-1.5.0-RC2.jar&lt;br/&gt;
&lt;br/&gt;
$java -version&lt;br/&gt;
java version &amp;quot;1.6.0_37&amp;quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)&lt;br/&gt;
Mac OS X:&lt;br/&gt;
System Version: Mac OS X 10.6.8 (10K549)&lt;br/&gt;
Kernel Version: Darwin 10.8.0&lt;br/&gt;
</environment>
            <key id="15961">CLJ-1146</key>
            <summary>Symbol name starting with digits to defn throws &quot;Unmatched delimiter )&quot;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="claj">Linus Ericsson</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Sun, 13 Jan 2013 15:41:03 -0600</created>
                <updated>Sun, 13 Jan 2013 15:41:03 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1138] data-reader returning nil causes exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1138</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If a data-reader returns nil, the reader throws java.lang.RuntimeException: No dispatch macro...  The error message implies that there is no dispatch macro for whatever the first character of the tag happens to be.&lt;/p&gt;

&lt;p&gt;Here&apos;s a simple example:&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;f/ignore (constantly nil)}&amp;#93;&lt;/span&gt; (read-string &quot;#f/ignore 42 10&quot;))&lt;/p&gt;

&lt;p&gt;RuntimeException No dispatch macro for: f  clojure.lang.Util.runtimeException (Util.java:219)&lt;/p&gt;</description>
                <environment>clojure 1.5 beta2, Mac OS X 10.8.2, java version &amp;quot;1.6.0_37&amp;quot;</environment>
            <key id="15916">CLJ-1138</key>
            <summary>data-reader returning nil causes exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Sat, 22 Dec 2012 08:41:18 -0600</created>
                <updated>Thu, 14 Feb 2013 15:06:47 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30289" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 09:43:27 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch allows a data-reader to return nil instead of throwing.  Does sanity check that possible tag or record isJavaIdentifierStart().  Gives better error message for special characters that might actually be dispatch macros (rather than assuming it&apos;s a tagged literal).&lt;/p&gt;</comment>
                    <comment id="30291" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:06:06 -0600"  >&lt;p&gt;clj-1138-data-reader-return-nil-for-no-op.patch allows a data-reader returning nil to be treated as a no-op by the reader (like #_).  nil is not normally a useful value (actually it causes an exception in Clojure 1.4 through 1.5 beta2) for a data-reader to return.  With this patch, one could get something like a conditional feature reader using data-readers.&lt;/p&gt;</comment>
                    <comment id="30292" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:26:43 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch is the first patch to consider.  It merely allows nil as a value from a data-reader and returns nil as the final value.  I think it does what was originally intended for dispatch macros, and gives a better error message in many cases (mostly typos).&lt;/p&gt;

&lt;p&gt;The second patch, clj-1138-data-reader-return-nil-for-no-op.patch, depends on the other being applied first.  It takes an extra step to treat a nil value returned from a data-reader as a no-op for the reader (like #_).&lt;/p&gt;</comment>
                    <comment id="30310" author="steveminer@gmail.com" created="Sun, 23 Dec 2012 11:52:28 -0600"  >&lt;p&gt;It turns out that you can work around the original problem by having your data-reader return &apos;(quote nil) instead of plain nil.  That expression conveniently evaluates to nil so you can get a nil if necessary.  This also works after applying the patches so there&apos;s still a way to return nil if you really want it.&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;x/nil (constantly &apos;(quote nil))}&amp;#93;&lt;/span&gt; (read-string &quot;#x/nil 42&quot;))&lt;br/&gt;
    ;=&amp;gt; (quote nil)&lt;/p&gt;</comment>
                    <comment id="30565" author="jafingerhut" created="Thu, 7 Feb 2013 09:20:27 -0600"  >&lt;p&gt;Patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch dated Dec 22 2012 still applies cleanly to latest master if you use the following command:&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch&lt;/p&gt;

&lt;p&gt;Without the --ignore-whitespace option, the patch fails only because some whitespace was changed in Clojure master recently.&lt;/p&gt;</comment>
                    <comment id="30584" author="jafingerhut" created="Wed, 13 Feb 2013 11:24:11 -0600"  >&lt;p&gt;OK, now with latest master (1.5.0-RC15 at this time), patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch no longer applies cleanly, not even using --ignore-whitespace in the &apos;git am&apos; command given above.  Steve, if you could see what needs to be updated, that would be great.  Using the patch command as suggested in the &quot;Updating stale patches&quot; section of &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; wasn&apos;t enough, so it should probably be carefully examined by hand to see what needs updating.&lt;/p&gt;</comment>
                    <comment id="30599" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:21:27 -0600"  >&lt;p&gt;I removed my patches.  Things have changes recently with the LispReader and new EdnReader.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1100] Reader literals cannot contain periods</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1100</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The LispReader tries to read a record instead of a literal if the tag contains periods:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1171&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1171&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which effectively means that reader tags cannot contain periods.&lt;br/&gt;
The EDN spec is unclear on this: &lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;edn supports extensibility through a simple mechanism. # followed immediately by a symbol starting with an alphabetic character indicates that that symbol is a tag.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;(issue opened: &lt;a href=&quot;https://github.com/edn-format/edn/issues/39&quot;&gt;https://github.com/edn-format/edn/issues/39&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;If periods are allowed, then the LispReader should first check to see if the tag is in &lt;tt&gt;&amp;#42;data-readers&amp;#42;&lt;/tt&gt; and only then if not try to initialize a Java class.&lt;/p&gt;

&lt;p&gt;I&apos;m happy to write the patch if this behavior is what is desired.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15812">CLJ-1100</key>
            <summary>Reader literals cannot contain periods</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="lynaghk">Kevin Lynagh</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Fri, 2 Nov 2012 23:57:22 -0500</created>
                <updated>Thu, 14 Feb 2013 15:04:53 -0600</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29904" author="steveminer@gmail.com" created="Tue, 6 Nov 2012 09:41:44 -0600"  >&lt;p&gt;The suggested patch (clj-1100-reader-literal-periods.patch) will break reading records when &amp;#42;default-data-reader-fn* is set.  Try adding a test like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(deftest tags-containing-periods-with-&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;
      ;; we need a predefined record &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; test so we (mis)use clojure.reflect.Field &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; convenience
      (let [v &lt;span class=&quot;code-quote&quot;&gt;&quot;#clojure.reflect.Field{:name \&quot;&lt;/span&gt;fake\&lt;span class=&quot;code-quote&quot;&gt;&quot; :type :fake :declaring-class \&quot;&lt;/span&gt;Fake\&lt;span class=&quot;code-quote&quot;&gt;&quot; :flags nil}&quot;&lt;/span&gt;]
        (binding [*&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-data-reader-fn* nil]
          (is (= (read-string v) #clojure.reflect.Field{:name &lt;span class=&quot;code-quote&quot;&gt;&quot;fake&quot;&lt;/span&gt; :type :fake :declaring-class &lt;span class=&quot;code-quote&quot;&gt;&quot;Fake&quot;&lt;/span&gt; :flags nil})))
        (binding [*&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-data-reader-fn* (fn [tag val] (assoc val :meaning 42))]
          (is (= (read-string v) #clojure.reflect.Field{:name &lt;span class=&quot;code-quote&quot;&gt;&quot;fake&quot;&lt;/span&gt; :type :fake :declaring-class &lt;span class=&quot;code-quote&quot;&gt;&quot;Fake&quot;&lt;/span&gt; :flags nil})))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="30085" author="richhickey" created="Thu, 29 Nov 2012 09:36:46 -0600"  >&lt;p&gt;The problem assessment is ok, but the resolution approach may not be. What happens should be based not upon what is in data-readers but whether or not the name names a class.&lt;/p&gt;

&lt;p&gt;Is the intent here to allow readers to circumvent records? I&apos;m not in favor of that.&lt;/p&gt;</comment>
                    <comment id="30098" author="steveminer@gmail.com" created="Thu, 29 Nov 2012 16:01:00 -0600"  >&lt;p&gt;New patch following Rich&apos;s comments.  The decision to read a record is now based on the symbol containing periods and not having a namespace.  Otherwise, it is considered a data reader tag.  User&lt;br/&gt;
defined tags are required to be qualified but they may now have periods in the name.  Tests added to show that&lt;br/&gt;
data readers cannot override record classes.  Note: Clojure-defined data reader tags may be unqualified, but they should not contain periods in order to avoid confusion with record classes.&lt;/p&gt;</comment>
                    <comment id="30100" author="steveminer@gmail.com" created="Thu, 29 Nov 2012 16:17:32 -0600"  >&lt;p&gt;I deleted my old patch and some comments referring to it to avoid confusion.&lt;/p&gt;

&lt;p&gt;In Clojure 1.5 beta 1, # followed by a qualified symbol with a period in the name is considered a record and causes an exception for the missing record class.  With the patch, only non-qualified symbols containing periods are considered records.  That allows user-defined qualified symbols with periods in their names to be used as data reader tags.&lt;/p&gt;</comment>
                    <comment id="30564" author="jafingerhut" created="Thu, 7 Feb 2013 09:05:09 -0600"  >&lt;p&gt;clj-1100-periods-in-data-reader-tags-patch-v2.txt dated Feb 7 2013 is identical to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012, except it applies cleanly to latest master.  The only change appears to be in some white space in the context lines.&lt;/p&gt;</comment>
                    <comment id="30567" author="jafingerhut" created="Thu, 7 Feb 2013 12:53:25 -0600"  >&lt;p&gt;I&apos;ve removed clj-1100-periods-in-data-reader-tags-patch-v2.txt mentioned in the previous comment, because I learned that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012 applies cleanly to latest master and passes all tests if you use this command to apply it.&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch&lt;/p&gt;

&lt;p&gt;I&apos;ve already updated the JIRA workflow and screening patches wiki pages to mention this --ignore-whitespace option.&lt;/p&gt;</comment>
                    <comment id="30585" author="jafingerhut" created="Wed, 13 Feb 2013 11:31:03 -0600"  >&lt;p&gt;Both of the current patches, &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012, and clj-1100-reader-literal-periods.patch dated Nov 6 2012, fail to apply cleanly to latest master (1.5.0-RC15) as of today, although they did last week.  Given all of the changes around read / read-string and edn recently, they should probably be evaluated by their authors to see how they should be updated.&lt;/p&gt;</comment>
                    <comment id="30600" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:23:26 -0600"  >&lt;p&gt;I deleted my patch: &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch.  clj-1100-reader-literal-periods.patch is clearly wrong, but the original author or an administrator has to delete that.&lt;/p&gt;</comment>
                    <comment id="30602" author="lynaghk" created="Thu, 14 Feb 2013 13:28:04 -0600"  >&lt;p&gt;I cannot figure out how to remove my attachment (clj-1100-reader-literal-periods.patch) in JIRA.&lt;/p&gt;</comment>
                    <comment id="30603" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 13:43:45 -0600"  >&lt;p&gt;Downarrow (popup) menu to the right of the &quot;Attachments&quot; section.  Choose &quot;manager attachments&quot;.&lt;/p&gt;</comment>
                    <comment id="30604" author="lynaghk" created="Thu, 14 Feb 2013 14:02:50 -0600"  >&lt;p&gt;Great, thanks Steve. Are you going to take another pass at this issue, or should I give it a go?&lt;/p&gt;</comment>
                    <comment id="30605" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 15:04:53 -0600"  >&lt;p&gt;Kevin, I&apos;m not planning to work on this right now as 1.5 is pretty much done.  It might be worthwhile discussing the issue a bit on the dev mailing list before working on a patch, but that&apos;s up to you.  I think my approach was correct, although now changes would have to be applied to both LispReader and EdnReader.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1033] pr-str and read-string don&apos;t handle @ symbols inside keywords properly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1033</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (read-string (pr-str {(keyword &lt;span class=&quot;code-quote&quot;&gt;&quot;key@other&quot;&lt;/span&gt;) :stuff}))
RuntimeException Map literal must contain an even number of forms  clojure.lang.Util.runtimeException (Util.java:170)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;pr-str emits &quot;{:key@other :stuff}&quot;, which read-string fails to interpret correctly. Either pr-str needs to escape the @ symbol, or read-string needs to handle the symbol inside a keyword.&lt;/p&gt;

&lt;p&gt;Background: I&apos;m passing a map with email addresses as keys through Storm bolts, which require a thrift-serializable form. Using the pr-str/read-string combo fails on these keys, so I&apos;ve fallen back to JSON serialization. &lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS; Java 1.7.0_05 Java HotSpot(TM) Client VM</environment>
            <key id="15600">CLJ-1033</key>
            <summary>pr-str and read-string don&apos;t handle @ symbols inside keywords properly</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stevenruppert">Steven Ruppert</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Thu, 26 Jul 2012 11:25:38 -0500</created>
                <updated>Sun, 13 Jan 2013 22:58:37 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29101" author="stu" created="Fri, 10 Aug 2012 12:51:33 -0500"  >&lt;p&gt;The &apos;@&apos; character is not a legal character for keywords or symbols (see &lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt;). Recategorized as enhancement request.&lt;/p&gt;</comment>
                    <comment id="29102" author="stevenruppert" created="Fri, 10 Aug 2012 13:04:23 -0500"  >&lt;p&gt;Then why doesn&apos;t (keyword &quot;keywith@&quot;) throw an exception? It seems inconsistent with your statement.&lt;/p&gt;</comment>
                    <comment id="29435" author="jafingerhut" created="Thu, 13 Sep 2012 14:23:29 -0500"  >&lt;p&gt;It is a long standing property of Clojure that it does not throw exceptions for everything that is illegal.&lt;/p&gt;</comment>
                    <comment id="29468" author="stevenruppert" created="Mon, 17 Sep 2012 14:16:01 -0500"  >&lt;p&gt;Yeah, but read-string clearly does. Is there a good reason that the &quot;keyword&quot; function &lt;em&gt;can&apos;t&lt;/em&gt; throw an exception? With the other special rules on namespaces within symbol names, the &quot;keyword&quot; function really should be doing validation.&lt;/p&gt;

&lt;p&gt;Another solution would be to allow a ruby-like :&quot;symbol with disallowed characters&quot; literal, but that would also be confusing with how the namespace is handled.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Ct5v9w0yNAE&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Ct5v9w0yNAE&lt;/a&gt; has some older discussion on this topic. &lt;/p&gt;</comment>
                    <comment id="29471" author="jafingerhut" created="Mon, 17 Sep 2012 19:43:54 -0500"  >&lt;p&gt;Disclaimer: I&apos;m not a Clojure/core member, just an interested contributor who doesn&apos;t know all the design decisions that were made here.&lt;/p&gt;

&lt;p&gt;Steven, I think perhaps a couple of concerns are: (1) doing such checks would be slower than not doing them, and (2) implementing such checks means having to update them if/when the rules for legal symbols, keywords, namespace names, etc. change.&lt;/p&gt;

&lt;p&gt;Would you be interested in writing strict versions of functions like symbol and keyword for addition to a contrib library?  And test suites that try to hit a significant number of corner cases in the rules for what is legal and what is not?  I mean those as serious questions, not rhetorical ones.  This would permit people that want to use the strict versions of these functions to do so, and at the same time make it easy to measure performance differences between the strict and loose versions.&lt;/p&gt;</comment>
                    <comment id="30435" author="stevenruppert" created="Sun, 13 Jan 2013 22:58:37 -0600"  >&lt;p&gt;Looking back at this, the root cause of the problem is that the {pr} function, although it by default &quot;print&lt;span class=&quot;error&quot;&gt;&amp;#91;s&amp;#93;&lt;/span&gt; in a way that objects can be read by the reader&quot; &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;, doesn&apos;t always do so. Thus, the easiest &quot;fix&quot; is to change its docstring to warn that not all keywords can be read back.&lt;/p&gt;

&lt;p&gt;The deeper problem is that symbol don&apos;t have a reader form that can represent all actually possible keywords (in this case, those with &quot;@&quot; in them). Restricting the actually-possible keywords to match the reader form, i.e. writing a strict &quot;keyword&quot; &lt;b&gt;function&lt;/b&gt; actually seems like a worse solution overall to me. The better solution would be to somehow extend the keyword reader form to allow it to express all possible keywords, possibly ruby&apos;s :&quot;keyword&quot; syntax. Plus, that solution would avoid having to keep hypothetical strict keyword/symbol functions in sync with reader operation, and write test cases for that, and so on.&lt;/p&gt;

&lt;p&gt;Thus, the resolution of this bug comes down to how far we&apos;re willing to go. Changing the docstring would be the easiest, but extending the keyword form would be the &quot;best&quot; resolution, IMO.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://clojuredocs.org/clojure_core/clojure.core/pr&quot;&gt;http://clojuredocs.org/clojure_core/clojure.core/pr&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-976] Implement reader literal and print support for PersistentQueue data structure</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-976</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure&apos;s PersistentQueue structure has been in the language for quite some time now and has found its way into a fair share of codebases. However, the creation of queues is a two step operation often of the form:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(conj clojure.lang.PersistentQueue/EMPTY :a :b :c)

;=&amp;gt; #&amp;lt;PersistentQueue clojure.lang.PersistentQueue@78d5f6bc&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A better experience might be the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;#queue [:a :b :c]

;=&amp;gt; #queue [:a :b :c]

(pop #queue [:a :b :c])

;=&amp;gt; #queue [:b :c]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This syntax is proposed and discussed in the Clojure-dev group at &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/GQqus5Wycno&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/GQqus5Wycno&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open question: Should the queue literal&apos;s arguments eval?  The implications of this are illustrated below:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;;; non-eval case
#queue [1 2 (+ 1 2)]

;=&amp;gt; #queue [1 2 (+ 1 2)]


;; eval case
#queue [1 2 (+ 1 2)]

;=&amp;gt; #queue [1 2 3]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The answer to this open question will determine the implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15370">CLJ-976</key>
            <summary>Implement reader literal and print support for PersistentQueue data structure</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="fogus">Fogus</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                        <label>data-structures</label>
                        <label>queue</label>
                        <label>reader</label>
                        <label>tagged-literals</label>
                    </labels>
                <created>Fri, 27 Apr 2012 09:31:36 -0500</created>
                <updated>Sat, 6 Apr 2013 08:07:20 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="28290" author="steveminer@gmail.com" created="Fri, 27 Apr 2012 10:18:19 -0500"  >&lt;p&gt;I think the non-eval behavior would be consistent with the other reader literals in Clojure 1.4.  It&apos;s definitely better for interop where some other language implementation could be expected to handle a few literal representations, but not the evaluation of Clojure expressions.  Use a regular function if the args need evaluation.&lt;/p&gt;</comment>
                    <comment id="28291" author="cemerick" created="Fri, 27 Apr 2012 10:19:50 -0500"  >&lt;p&gt;The precedent of records seems relevant:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (defrecord A [b])
user.A
=&amp;gt; #user.A[(+ 4 5)]
#user.A{:b (+ 4 5)}
=&amp;gt; #user.A{:b (+ 4 5)}
#user.A{:b (+ 4 5)}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This continues to make sense, as otherwise queues would need to print with an extra &lt;tt&gt;(quote &#8230;)&lt;/tt&gt; form around lists &#8212; which records neatly avoid:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (A. &apos;(+ 4 5))
#user.A{:b (+ 4 5)}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Does this mean that a &lt;tt&gt;queue&lt;/tt&gt; fn (analogous to &lt;tt&gt;vector&lt;/tt&gt;, maybe) will also make an appearance?  It&apos;d be handy for HOF usage.&lt;/p&gt;</comment>
                    <comment id="28293" author="fogus" created="Fri, 27 Apr 2012 11:00:12 -0500"  >&lt;p&gt;Added a patch for the tagged literal support ONLY. This is only one part of the total solution. This provides the read-string and printing capability. I&apos;d like more discussion around the eval side before I get dive into the compiler.&lt;/p&gt;</comment>
                    <comment id="28298" author="pmbauer" created="Fri, 27 Apr 2012 18:45:48 -0500"  >&lt;p&gt;In addition to Chas&apos; observations on consistency with record literals, would eval in queue literals open up the same security hole as #=, needing to respect *&lt;b&gt;read-eval&lt;/b&gt;*?&lt;br/&gt;
When needing eval inside a queue literal, embedding a #= seems more apropos.&lt;/p&gt;</comment>
                    <comment id="28385" author="fogus" created="Fri, 4 May 2012 13:14:29 -0500"  >&lt;p&gt;Evalable queue literal support.&lt;/p&gt;</comment>
                    <comment id="28430" author="jafingerhut" created="Thu, 10 May 2012 17:54:13 -0500"  >&lt;p&gt;Neither of the patches &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-tagged-parse-support-only.diff dated Apr 27, 2012 nor &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval.diff dated May 4, 2012 apply cleanly to latest master as of May 10, 2012.&lt;/p&gt;</comment>
                    <comment id="28454" author="fogus" created="Fri, 11 May 2012 10:15:35 -0500"  >&lt;p&gt;Updated patch file to merge with latest master.&lt;/p&gt;</comment>
                    <comment id="29008" author="fogus" created="Fri, 20 Jul 2012 13:14:37 -0500"  >&lt;p&gt;New patch with support fixed for syntax-quote.&lt;/p&gt;</comment>
                    <comment id="29212" author="stuart.sierra" created="Fri, 17 Aug 2012 12:41:10 -0500"  >&lt;p&gt;Patch does not apply as of commit f5f4faf95051f794c9bfa0315e4457b600c84cef&lt;/p&gt;</comment>
                    <comment id="29214" author="fogus" created="Fri, 17 Aug 2012 15:06:18 -0500"  >&lt;p&gt;Weird. I was able to download the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff patch and apply it to HEAD as of just now (f5f4faf95051f794c9bfa0315e4457b600c84cef). There were whitespace warnings, but the patch applied, compiles and passes all tests.&lt;/p&gt;
</comment>
                    <comment id="29217" author="jafingerhut" created="Fri, 17 Aug 2012 19:29:01 -0500"  >&lt;p&gt;With latest head I was able to successfully apply patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff with this command:&lt;/p&gt;

&lt;p&gt;git am --keep-cr -s &amp;lt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff&lt;/p&gt;

&lt;p&gt;with some warnings, but successfully applied.  If I try it without the --keep-cr option, the patch fails to apply.  I believe this is often a sign that either one of the files being patched, or the patch itself, contains CR/LF line endings, which some of the Clojure source files definitely do.&lt;/p&gt;

&lt;p&gt;The command above (with --keep-cr) is currently the one recommended for applying patches on page &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; in section &quot;Screening Tickets&quot;.  I added the suggested --keep-cr option after running across another patch that applied with the option, but not without it.&lt;/p&gt;
</comment>
                    <comment id="29281" author="jafingerhut" created="Tue, 28 Aug 2012 17:45:26 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete back to Test, since the latest patch does apply cleanly if --keep-cr option is used.&lt;/p&gt;</comment>
                    <comment id="29408" author="richhickey" created="Sat, 8 Sep 2012 06:48:32 -0500"  >&lt;p&gt;this needs more time&lt;/p&gt;</comment>
                    <comment id="29480" author="fogus" created="Tue, 18 Sep 2012 08:15:58 -0500"  >&lt;p&gt;Rich, &lt;/p&gt;

&lt;p&gt;Do you mind providing a little more detail?  I would be happy to make any changes if needed. However, if it&apos;s just a matter of its relationship to EDN and/or waiting until the next release then I am happy to wait.  In either case, I&apos;d like to complete this or push it to the back of my mind. Thanks.&lt;/p&gt;</comment>
                    <comment id="29602" author="jafingerhut" created="Fri, 5 Oct 2012 07:49:12 -0500"  >&lt;p&gt;clj-976-queue-literal-eval-and-synquote-patch-v2.txt dated Oct 5 2012 is identical to Fogus&apos;s patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff dated Jul 20 2012.  It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="29665" author="jafingerhut" created="Tue, 16 Oct 2012 12:20:27 -0500"  >&lt;p&gt;clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated oct 16 2012 is identical to Fogus&apos;s patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff dated Jul 20 2012. It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="29730" author="jafingerhut" created="Sat, 20 Oct 2012 12:26:05 -0500"  >&lt;p&gt;Fogus, with the recent commit of a patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt;, my touched-up patch clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated Oct 16 2012 doesn&apos;t apply cleanly.  In this case it isn&apos;t simply a few lines of context that have changed, it is the interfaces that PersistentQueue implements have been changed.  It might be best if you take a look at the latest code and the patch and consider how it should be updated.&lt;/p&gt;</comment>
                    <comment id="30884" author="steveminer@gmail.com" created="Sat, 6 Apr 2013 08:07:20 -0500"  >&lt;p&gt;Related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1078&quot; title=&quot;Added queue, queue* and queue? to clojure.core&quot;&gt;CLJ-1078&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11392" name="CLJ-976-queue-literal-eval-and-synquote.diff" size="15932" author="fogus" created="Fri, 20 Jul 2012 13:14:37 -0500" />
                    <attachment id="11566" name="clj-976-queue-literal-eval-and-synquote-patch-v3.txt" size="15688" author="jafingerhut" created="Tue, 16 Oct 2012 12:20:26 -0500" />
                    <attachment id="11200" name="CLJ-976-queue-literal-eval.diff" size="13229" author="fogus" created="Fri, 11 May 2012 10:15:35 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10013">Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-950] Function literals behavior differ from that of fns</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-950</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;	((fn [] true)) ; true&lt;br/&gt;
	(#(true)) ; classcast exception&lt;/p&gt;

&lt;p&gt;	((fn [])) ; nil&lt;br/&gt;
	(#()) ; ()&lt;/p&gt;

&lt;p&gt;	(some (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;_) &lt;span class=&quot;error&quot;&gt;&amp;#91;nil false 0 1&amp;#93;&lt;/span&gt;) ; 0&lt;br/&gt;
	(some #(%) &lt;span class=&quot;error&quot;&gt;&amp;#91;nil false 0 1&amp;#93;&lt;/span&gt;) ; NPE&lt;/p&gt;</description>
                <environment></environment>
            <key id="15270">CLJ-950</key>
            <summary>Function literals behavior differ from that of fns</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="vemv">V&#237;ctor M. Valenzuela</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Thu, 8 Mar 2012 06:13:29 -0600</created>
                <updated>Fri, 1 Mar 2013 12:46:59 -0600</updated>
                    <resolved>Thu, 8 Mar 2012 12:28:16 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27914" author="tsdh" created="Thu, 8 Mar 2012 12:27:36 -0600"  >&lt;p&gt;This is no defect.  Function literals must have a function (or macro or special form) as first symbol.&lt;br/&gt;
So your examples should be written like so:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; (#(do true))
true
user&amp;gt; (#(do))
nil
user&amp;gt; (some #(do %) [nil false 0 1])
0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="27915" author="vemv" created="Thu, 8 Mar 2012 14:10:31 -0600"  >&lt;p&gt;It makes sense. However (and correct me if I&apos;m wrong) there should be little problem in making them fully equivalent to fns, resulting in a more concise and consistent API.&lt;/p&gt;

&lt;p&gt;Please consider re-opening the issue as a feature request.&lt;/p&gt;

&lt;p&gt;Regards - V&#237;ctor.&lt;/p&gt;</comment>
                    <comment id="27917" author="tsdh" created="Fri, 9 Mar 2012 01:26:53 -0600"  >&lt;p&gt;The reader docs at &lt;a href=&quot;http://www.clojure.org/reader&quot;&gt;http://www.clojure.org/reader&lt;/a&gt; say that #() is not a replacement for (fn [] ...).  You can&apos;t make it more equivalent to fn without making it much harder to understand.  Let me explain that with an example.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(defn get-time []
  (System/currentTimeMillis))

(#(get-time)) ;; What&apos;s the result?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What&apos;s the result of the funcall above?  Clearly, right now, it is the current system time.&lt;/p&gt;

&lt;p&gt;So if we decided to allow to write #(true) as an alternative to (constantly true) &lt;span class=&quot;error&quot;&gt;&amp;#91;which is a varargs fn&amp;#93;&lt;/span&gt; or #(do true) &lt;span class=&quot;error&quot;&gt;&amp;#91;which is a fn of zero args&amp;#93;&lt;/span&gt;, then valid values of #(get-time) where both the current system time but also the function object for get-time.  Functions are values, too.&lt;/p&gt;

&lt;p&gt;Ok, one could say that in the case of a function, #(function) is always a call, but it would make it harder to reason about what the code does for not much benefit.&lt;/p&gt;</comment>
                    <comment id="27918" author="vemv" created="Fri, 9 Mar 2012 07:56:44 -0600"  >&lt;p&gt;You&apos;re right - satisfying my request would require to change the average use of this feature to &lt;tt&gt;#((some_fn %1 %2))&lt;/tt&gt; rather than just &lt;tt&gt;#(some_fn %1 %2)&lt;/tt&gt;, if we wanted &lt;tt&gt;#(true)&lt;/tt&gt; to be valid. Which indeed would be barely handy.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-928] instant literal for Date and Timestamp should print in UTC</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-928</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The default #inst returns a java.util.Date.  Date is always in UTC, and doesn&apos;t know about time zones, but the implementation of the print method always renders it in the default time zone.  For example,&lt;/p&gt;

&lt;p&gt;user=&amp;gt; #inst &quot;2012Z&quot;&lt;br/&gt;
#inst &quot;2011-12-31T19:00:00.000-05:00&quot;&lt;/p&gt;

&lt;p&gt;RFC3339 says:&lt;/p&gt;

&lt;p&gt;4.3. Unknown Local Offset Convention&lt;/p&gt;

&lt;p&gt;  If the time in UTC is known, but the offset to local time is unknown,&lt;br/&gt;
  this can be represented with an offset of &quot;-00:00&quot;.  This differs&lt;br/&gt;
  semantically from an offset of &quot;Z&quot; or &quot;+00:00&quot;, which imply that UTC&lt;br/&gt;
  is the preferred reference point for the specified time.&lt;/p&gt;

&lt;p&gt;java.sql.Timestamp should also print in UTC since that class doesn&apos;t keep timezone information.  The print-method for Timestamp seems broken.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;inst #&apos;clojure.instant/read-instant-timestamp}] (read-string &quot;#inst \&quot;2012Z\&quot;&quot;))&lt;br/&gt;
#inst &quot;2011-12-31T19:000000000000000-05:00&quot;&lt;br/&gt;
&lt;br/&gt;
user=&amp;gt; (binding [&lt;b&gt;data-readers&lt;/b&gt; {&apos;inst #&apos;clojure.instant/read-instant-timestamp}&amp;#93;&lt;/span&gt; (read-string &quot;#inst \&quot;2012-01-01T01:23:45.678+00:00\&quot;&quot;))&lt;br/&gt;
#inst &quot;2011-12-31T20:267800000000000-05:00&quot;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (java.sql.Timestamp. 0)&lt;br/&gt;
#inst &quot;1969-12-31T19:000000000000000-05:00&quot;&lt;/p&gt;


&lt;p&gt;The implementations of the print-methods for Data, GregorianCalendar and Timestamp do too much string manipulation.  I suggest doing some refactoring.  (Patch coming soon.)&lt;/p&gt;

&lt;p&gt;Also, the documentation needs some updating.  clojure.instant/read-instant-date, etc. mention &lt;b&gt;instant-reader&lt;/b&gt; but I think that mechanism was generalized as &lt;b&gt;data-readers&lt;/b&gt;.&lt;/p&gt;</description>
                <environment>1.4-beta1, Mac OS X 10.7.3, java version &amp;quot;1.6.0_30&amp;quot;</environment>
            <key id="15207">CLJ-928</key>
            <summary>instant literal for Date and Timestamp should print in UTC</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Tue, 7 Feb 2012 13:19:34 -0600</created>
                <updated>Fri, 1 Mar 2013 12:46:58 -0600</updated>
                    <resolved>Fri, 24 Feb 2012 15:29:11 -0600</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27689" author="steveminer@gmail.com" created="Tue, 7 Feb 2012 13:28:29 -0600"  >&lt;p&gt;#inst literals for Date and Timestamp should print in UTC.  Fixed round-tripping problem with Timestamp nanos (and re-enabled test).  Refactored print-methods to avoid some string manipulations, particularly regarding Calendar timezone offsets.  Added tests including those from &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-926&quot; title=&quot;Instant literals do not round trip correctly&quot;&gt;&lt;del&gt;CLJ-926&lt;/del&gt;&lt;/a&gt;, which this patch also fixes.  Fixed doc on read-instant-date, etc.&lt;/p&gt;</comment>
                    <comment id="27691" author="fogus" created="Tue, 7 Feb 2012 15:10:58 -0600"  >&lt;p&gt;Thank you.  I will run this patch through the paces ASAP.&lt;/p&gt;</comment>
                    <comment id="27693" author="cosmin" created="Tue, 7 Feb 2012 19:09:47 -0600"  >&lt;p&gt;&quot;Date is always in UTC, and doesn&apos;t know about time zones&quot;&lt;/p&gt;

&lt;p&gt;Given that pretty much all of the methods on Date return results in the local timezone, I wouldn&apos;t quite say that Date is always in UTC. Granted, most of those methods are deprecated; toString() however isn&apos;t and it also displays the date in the local timezone.&lt;/p&gt;

&lt;p&gt;We can certainly force printing of dates in UTC, by overriding the timezone setting on SimpleDateFormat, and there might be other valid reasons for always forcing UTC representation. Dates not being timezone aware however doesn&apos;t seem like one to me.&lt;/p&gt;</comment>
                    <comment id="27698" author="steveminer@gmail.com" created="Wed, 8 Feb 2012 08:54:11 -0600"  >&lt;p&gt;It&apos;s only a slight exaggeration to say that a java.util.Date is intrinsically a long (milliseconds since &quot;the epoch&quot;).  For Clojure&apos;s purposes, an &quot;instant&quot; is a point in time in a universal sense (not situated in a timezone) so UTC makes sense as the canonical form.  RFC 3339 section 4.3 says to use &quot;-00:00&quot; for the offset when timezone information is unknown.  java.sql.Timestamp is like a Date with an extra field for nanos so it also should use UTC for the canonical form.&lt;/p&gt;

&lt;p&gt;My argument for UTC as the canonical form is that it best matches the desired semantics of a Clojure instant.  I think it&apos;s the most conservative way to go and offers the best approach to interoperability by following RFC 3339.&lt;/p&gt;

&lt;p&gt;java.util.Calendar is by design cognizant of timezones so it arguably makes sense to preserve the timezone information.  Note that comparisons of Calendars take into account the timezone so two Calendar objects might be the same instant in a sense but not be equal because of the timezones.  That might be a bit tricky for Clojure users who want a clean abstraction of &quot;instant&quot; with multiple implementations.  Presumably they know what they are doing if they decide to use read-instant-calendar.  It might be a good idea to be more explicit about this in the documentation.&lt;/p&gt;</comment>
                    <comment id="27781" author="fogus" created="Mon, 20 Feb 2012 15:22:01 -0600"  >&lt;p&gt;Modified priting to conform to the following:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Instant instances are stored in UTC format without offset information.&lt;/li&gt;
	&lt;li&gt;Instant literals with offset information will be parsed and stored with offset applied.&lt;/li&gt;
	&lt;li&gt;Instant literals without offset information will be parsed as UTC format without offset information.&lt;/li&gt;
	&lt;li&gt;Instants will print as time having local offset applied and without offset printed.&lt;/li&gt;
	&lt;li&gt;Instants without offset info will be print-dup&apos;d as UTC format with RFC-3339 default offset information (-00:00)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    This provides a canonical storage and read format of UTC and a print format relative to the local offset.&lt;/p&gt;</comment>
                    <comment id="27846" author="stuart.sierra" created="Fri, 24 Feb 2012 14:11:18 -0600"  >&lt;p&gt;With Fogus&apos; patch on Feb. 20, instant literals do not round-trip unless &lt;tt&gt;&amp;#42;print-dup&amp;#42;&lt;/tt&gt; is bound true:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt;  (let [i (read-string &lt;span class=&quot;code-quote&quot;&gt;&quot;#inst \&quot;&lt;/span&gt;2012-02-24T14:41-02:00\&quot;&quot;)
              j (read-string (pr-str i))]
          (prn i)
          (prn j)
          (prn (= i j)))
#inst &lt;span class=&quot;code-quote&quot;&gt;&quot;2012-02-24T11:41:00.000&quot;&lt;/span&gt;
#inst &lt;span class=&quot;code-quote&quot;&gt;&quot;2012-02-24T06:41:00.000&quot;&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
nil
user=&amp;gt;(binding [*print-dup* &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
        (let [i (read-string &lt;span class=&quot;code-quote&quot;&gt;&quot;#inst \&quot;&lt;/span&gt;2012-02-24T14:41-02:00\&quot;&quot;)
              j (read-string (pr-str i))]
          (prn i)
          (prn j)
          (prn (= i j))))
#inst &lt;span class=&quot;code-quote&quot;&gt;&quot;2012-02-24T16:41:00.000-00:00&quot;&lt;/span&gt;
#inst &lt;span class=&quot;code-quote&quot;&gt;&quot;2012-02-24T16:41:00.000-00:00&quot;&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
nil&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The docstring of &lt;tt&gt;&amp;#42;print-dup&amp;#42;&lt;/tt&gt; says nothing about print/read values being equal (by Clojure&apos;s definition of =) only that print/read values will be of the same type. &quot;Type&quot; is not a particularly meaningful concept when applied to data literals.&lt;/p&gt;

&lt;p&gt;We (Stuart &amp;amp; Luke) believe that print/read values should &lt;b&gt;always&lt;/b&gt; print in such a way that they can be read back as the same instant.  Printing an instant should either:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;print in local time, with local offset&lt;/li&gt;
	&lt;li&gt;always print in UTC, with zero offset&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Instants should &lt;b&gt;never&lt;/b&gt; print without any time zone offset, as this admits too much confusion.&lt;/p&gt;</comment>
                    <comment id="27848" author="stuart.sierra" created="Fri, 24 Feb 2012 14:46:56 -0600"  >&lt;p&gt;Just spoke with Rich Hickey, who made the following assertions:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Instants should always represent an exact point in time, unambiguously. This representation may include time zone information.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Our specification for instant literals allows any part on the right to be omitted. Omitting the time zone offset means UTC is assumed. It is not important whether or not the default printer includes the UTC &quot;00:00&quot; offset or omits it.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;If we are printing an instant literal based on a type that does &lt;b&gt;not&lt;/b&gt; contain time zone information (e.g., java.util.Date) then we should &lt;b&gt;not&lt;/b&gt; add time zone information but simply print in UTC.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;If we are printing an instant literal based on a type that &lt;b&gt;can&lt;/b&gt; contain time zone information (e.g., java.util.Calendar) then we &lt;b&gt;may&lt;/b&gt; print with the time zone offset included. This is a nice-to-have feature, not a requirement. It is always permissible to print instants in UTC.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;It is possible that round-trip print/read of an instant &lt;b&gt;may&lt;/b&gt; lose time zone information, depending on the types used, but it this should not change the meaning of the instant in UTC.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="27851" author="steveminer@gmail.com" created="Fri, 24 Feb 2012 15:13:29 -0600"  >&lt;p&gt;I believe my original patch satisfies the requirements stated above.  I&apos;m happy to work on this if you want something changed.&lt;/p&gt;</comment>
                    <comment id="27852" author="stuart.sierra" created="Fri, 24 Feb 2012 15:22:53 -0600"  >&lt;p&gt;Rejected Fogus&apos; patch of Feb. 20.&lt;/p&gt;

&lt;p&gt;Screened Steve Miner&apos;s patch of Feb. 7. Ready for Rich.&lt;/p&gt;</comment>
                    <comment id="27853" author="stuart.sierra" created="Fri, 24 Feb 2012 15:29:11 -0600"  >&lt;p&gt;Patch applied.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10933" name="CLJ-928-instant-literals-for-Date-and-Timestamp-fogus.patch" size="21551" author="fogus" created="Mon, 20 Feb 2012 15:22:01 -0600" />
                    <attachment id="10896" name="CLJ-928-instant-literals-for-Date-and-Timestamp.patch" size="13173" author="steveminer@gmail.com" created="Tue, 7 Feb 2012 13:28:29 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-927] default tagged literal reader</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-927</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;With data reader support, it&apos;s impossible to write a program to read an arbitrary stream of Clojure forms.  For example, the following code will fail with the current 1.4.0-beta1 tagged literal support:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;#point [0 2]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It might be enough to require that the read side define a reader for &lt;tt&gt;point&lt;/tt&gt;, but what if we do not wish to require that both sides of the conversation know about the &lt;tt&gt;#point&lt;/tt&gt; tag beforehand?  Using the &lt;tt&gt;identity&lt;/tt&gt; function as a default allows the reader to handle the literal form as is even when it doesn&apos;t recognize a tag (or even care to translate it).&lt;/p&gt;

&lt;p&gt;The change from the current behavior is that missing tagged literal parsers are no longer error conditions.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="15206">CLJ-927</key>
            <summary>default tagged literal reader</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                        <label>clojure</label>
                        <label>reader</label>
                    </labels>
                <created>Mon, 6 Feb 2012 15:45:06 -0600</created>
                <updated>Fri, 1 Mar 2013 09:49:21 -0600</updated>
                    <resolved>Fri, 9 Nov 2012 08:26:05 -0600</resolved>
                                            <fixVersion>Release 1.5</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27708" author="steveminer@gmail.com" created="Sun, 12 Feb 2012 10:30:52 -0600"  >&lt;p&gt;I&apos;d like to preserve the unknown literal tag as well as the value.  That would allow a program to recreate the printed representation.  A map would work as the value. You&apos;d get something like: {:unknown-literal point :value &lt;span class=&quot;error&quot;&gt;&amp;#91;0 2&amp;#93;&lt;/span&gt;}.  If you needed to pass that on to some other process, you could easily write it in the original literal form.  Perhaps the key for literal tag should be namespace qualified to avoid possible confusion with user data.  Another benefit of returning a map for an unknown literal tag is that equality tests still seem reasonable:  (not= #foo &quot;abc&quot; #bar &quot;abc&quot;).&lt;/p&gt;</comment>
                    <comment id="29483" author="steveminer@gmail.com" created="Tue, 18 Sep 2012 11:01:38 -0500"  >&lt;p&gt;It would be convenient if I could handle unknown tags using some sort of catch-all key in &amp;#42;data-readers* (say &apos;default).  The associated function should take two arguments: the tag and the literal value.  If there is no &apos;default key in &amp;#42;data-readers*, then an error would be thrown (same as Clojure 1.4).  &lt;/p&gt;

&lt;p&gt;I think it&apos;s a simple way to allow the programmer to take control without having to add new API or data types.  It&apos;s just one distinguished key (&apos;default, :default something like that) and one additional line of doc.&lt;/p&gt;

&lt;p&gt;I can provide a patch.&lt;/p&gt;</comment>
                    <comment id="29513" author="richhickey" created="Fri, 21 Sep 2012 09:17:03 -0500"  >&lt;p&gt;This needs to be addressed. We should follow the advice given in the &lt;a href=&quot;https://github.com/edn-format/edn&quot;&gt;edn&lt;/a&gt; docs:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;If a reader encounters a tag for which no handler is registered, the implementation can either report an error, call a designated &apos;unknown element&apos; handler, or create a well-known generic representation that contains both the tag and the tagged element, as it sees fit. Note that the non-error strategies allow for readers which are capable of reading any and all edn, in spite of being unaware of the details of any extensions present.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We can get both of the latter by having a preinstalled default unknown element handler that returns the generic representation. &quot;identity&quot; is out since it loses the tag. Using a map with namespaced keys is somewhat subtle. An TaggedElement record type is also possible.&lt;/p&gt;

&lt;p&gt;Issues are - what happens when more than one library tries to supply a default? If the system supplies one, perhaps it&apos;s best to only allow dynamic rebinding and not static installation. Or error on conflicting default handlers, or first/last one wins (but first/&apos;last&apos; might be difficult to predict).&lt;/p&gt;</comment>
                    <comment id="29672" author="steveminer@gmail.com" created="Wed, 17 Oct 2012 12:49:16 -0500"  >&lt;p&gt;Everyone agrees that identity is not an appropriate default so I changed the Summary field.&lt;/p&gt;</comment>
                    <comment id="29683" author="steveminer@gmail.com" created="Thu, 18 Oct 2012 20:54:29 -0500"  >&lt;p&gt;Minimal patch that adds support for a default data reader in &amp;#42;data-readers*.  If an unknown tag is read, we look up the &apos;default reader in &amp;#42;data-readers and call it with two arguments: the tag and the value.  By default, there is no default reader and you get an exception as in Clojure 1.4.&lt;/p&gt;</comment>
                    <comment id="29684" author="steveminer@gmail.com" created="Thu, 18 Oct 2012 20:57:47 -0500"  >&lt;p&gt;An alternative patch that establishes a default data reader to handle the case of an unknown tag.  The default reader returns a map with metadata to define the :unknown-tag.  This preserves the information for the unknown data literal, but keeps a simple and convenient format.&lt;/p&gt;</comment>
                    <comment id="29685" author="stu" created="Fri, 19 Oct 2012 05:27:54 -0500"  >&lt;p&gt;Steve,&lt;/p&gt;

&lt;p&gt;I am guessing that you consider these two patches alternatives, not cumulative. I am marking as screened the &quot;default-in-data-readers&quot; patch, which allows users to specify a &apos;default handler.&lt;/p&gt;

&lt;p&gt;The other patch &quot;unknown-data-reader&quot;, which specifies a built-in Clojure handler for unknown tags, is &lt;b&gt;not&lt;/b&gt; screened. It specifies a default handler that returns a metadata-annotated map.  If there is to be a default handler, I think it would need to return something disjoint from data, e.g. a tagged interface of some kind (or at least a namespaced name in the map.)&lt;/p&gt;

&lt;p&gt;It would be a great help to have a little discussion along with the patches.&lt;/p&gt;</comment>
                    <comment id="29686" author="steveminer@gmail.com" created="Fri, 19 Oct 2012 08:01:06 -0500"  >&lt;p&gt;Yes, the two patches are separate alternatives.  The &quot;default-in-data-readers&quot; patch just adds the special treatment for the &apos;default key in &amp;#42;data-readers* without providing a system default.  This allows the application programmer to provide a catch-all handler for unknown data literal tags.  Libraries should be discouraged from setting a &apos;default handler.  Conflicts with the &apos;default key in data_readers.clj are handled just like other keys so it would be a bad thing for multiple libraries to try to take over the &apos;default data reader.  Libraries can instead provide implementations and let the application programmer do the actual setting of the &apos;default key.&lt;/p&gt;

&lt;p&gt;The second patch (&quot;unknown-data-reader&quot;) implements &apos;default similarly, but also provides for a &apos;default reader in default-data-readers.  My unknown-data-reader returns a map.  I found it safer and simpler to deal with keywords instead of symbols for unknown tag &amp;#8211; Clojure doesn&apos;t like symbols for unknown packages and you never know what you might get in data literal tags.  After experimenting with with my original idea of having a map with two keys (essentially :tag and :value), I decided that I preferred the single entry map with the key derived from the tag and the value preserved as read.  Adding the metadata to define the :unknown-tag provides enough information for the application programmer to deal with the maps unambiguously.  I think the single entry maps are easier to read.&lt;/p&gt;

&lt;p&gt;The alternative that I did not pursue would be to use a new record type as the default data type.  My second patch could be used as a basis for that approach.  We just need to replace my unknown-data-reader function with one that creates a record (TaggedElement).&lt;/p&gt;</comment>
                    <comment id="29706" author="richhickey" created="Fri, 19 Oct 2012 17:43:54 -0500"  >&lt;p&gt;I don&apos;t like the &apos;default entry, especially if it is usually wrong for a library to set it. &lt;/p&gt;

&lt;p&gt;Having no bindable var default makes editing data_readers.clj an outstanding chore for everyone. &lt;/p&gt;

&lt;p&gt;It is unlikely a single special override in data_readers.clj is suitable for every reading situation, even in the same app.&lt;/p&gt;

&lt;p&gt;If there is a known TaggedElement type, then people need only be able to opt out of that. &lt;br/&gt;
So if there were a &lt;b&gt;default-tagged-reader&lt;/b&gt; function of (tag read-element) that built a TaggedElement (or, alternatively, threw, if people prefer), people could just rebind that in a particular reading context.&lt;/p&gt;

&lt;p&gt;There&apos;s no perfect default, but in most situations getting unknown data is an error. I personally would default to that, and provide a read-tagged-element fn people could bind in when trying to implement read-anything.&lt;/p&gt;</comment>
                    <comment id="29727" author="steveminer@gmail.com" created="Sat, 20 Oct 2012 10:03:35 -0500"  >&lt;p&gt;old patches deleted.  This revised patch introduces a var &amp;#42;default-data-reader-fn* which can be used to handle unknown tags.  By default it is nil and an exception is thrown for the unknown tag as in Clojure 1.4.  If it&apos;s non-nil, the function is called with the tag and value.  I chose the name so that it contained &apos;data-reader&apos;, which makes it search friendly.  I wanted to commit this separately from any attempt to provide a built-in catch-all reader and new record type as that might be more contentious.&lt;/p&gt;</comment>
                    <comment id="29891" author="steveminer@gmail.com" created="Fri, 2 Nov 2012 09:42:10 -0500"  >&lt;p&gt;The patch for &amp;#42;default-data-reader-fn* was committed for Clojure 1.5 beta1.  The programmer can now specify a catch-all reader, which solves the main issue.  However, there is no built-in default reader so unknown tags still cause exceptions to be thrown as in Clojure 1.4.  &lt;/p&gt;

&lt;p&gt;I think this bug can be closed.  Default reader implementations could be provided by a contrib library.  Or someone can open a new bug if you want the language to provide a built-in default reader.&lt;/p&gt;</comment>
                    <comment id="29892" author="bronsa" created="Fri, 2 Nov 2012 13:24:46 -0500"  >&lt;p&gt;what about adding &lt;b&gt;default-tagged-reader-fn&lt;/b&gt; to clojure.main/with-bindings to make it set!able?&lt;/p&gt;</comment>
                    <comment id="29897" author="steveminer@gmail.com" created="Sat, 3 Nov 2012 09:29:54 -0500"  >&lt;p&gt;Good point about making it set!-able.  I filed that issue as a separate bug: &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1101&quot; title=&quot;*default-data-reader-fn* should be set!-able in REPL&quot;&gt;CLJ-1101&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="29914" author="stuart.sierra" created="Fri, 9 Nov 2012 08:26:05 -0600"  >&lt;p&gt;Resolved.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11586" name="CLJ-927-default-data-reader-fn-for-unknown-tags.patch" size="5278" author="steveminer@gmail.com" created="Sat, 20 Oct 2012 10:03:35 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-926] Instant literals do not round trip correctly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-926</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When using java.util.Date for instant literals (which is the default) instants do not round-trip properly during daylight savings. Here is an example:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(read-string &quot;#inst \&quot;2010-11-12T13:14:15.666-06:00\&quot;&quot;)
#inst &quot;2010-11-13T06:14:15.666+10:00&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m currently in Melbourne, which is normally GMT+10. However, on November 12th daylight savings is in effect, so the proper GMT offset is +11. The date above is actually using the correct local time (6:14:15) but with the wrong offset. The problem is more obvious when you attempt to round-trip the instant that was read.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; #inst &quot;2010-11-13T06:14:15.666+10:00&quot;
#inst &quot;2010-11-13T07:14:15.666+10:00&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Notice that we read 6:14am but the output was 7:14 with the same offset. Upon digging deeper the real culprit seems to be the use of String.format (through clojure.core/format) when outputting java.util.Date. Notice the following inside caldate-&amp;gt;rfc3339&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(format &quot;#inst \&quot;%1$tFT%1$tT.%1$tL%1$tz\&quot;&quot; d))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let&apos;s compare the timezone offset in the underlying date with what is printed by %1$tz&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; (def d #inst &quot;2010-11-13T06:14:15.666+10:00&quot;)
#&apos;clojure.instant/d                                                                                                                                                                                         
user&amp;gt; (.getHours d)
7                                                                                                                                                                                                           
user&amp;gt; (.getTimezoneOffset d)
-660
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For reference, the definition of getTimezoneOffset is &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;-(Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;So far it looks good. 6am in GMT+10 becomes 7am in GMT+11. Let&apos;s see how String.format handles it though.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;                                                                                               
clojure.instant&amp;gt; (format &quot;%1$tz&quot; d)
&quot;+1000&quot;                                                                                                                                                                                                     
clojure.instant&amp;gt; (format &quot;%1$tT&quot; d)
&quot;07:14:15&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;String.format prints the correct hour, but with the wrong offset. The recommended way for formatting dates is to use a DateFormatter. &lt;/p&gt;

&lt;p&gt;The String.format approach appears to work properly for Calendar, but not for Date. Therefore the attached patch keeps the current &lt;br/&gt;
implementation for java.util.Calendar but uses SimpleDateFormat to handle java.util.Date correctly. This fixes the roundtrip problem.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="15202">CLJ-926</key>
            <summary>Instant literals do not round trip correctly</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cosmin">Cosmin Stejerean</reporter>
                        <labels>
                        <label>instant</label>
                        <label>reader</label>
                        <label>tagged-literals</label>
                    </labels>
                <created>Sun, 5 Feb 2012 21:23:19 -0600</created>
                <updated>Fri, 17 Feb 2012 15:55:14 -0600</updated>
                    <resolved>Fri, 17 Feb 2012 15:55:14 -0600</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27675" author="cosmin" created="Sun, 5 Feb 2012 21:29:22 -0600"  >&lt;p&gt;Not quite sure how to create a repeatable test for this since the issue depends on the local timezone.&lt;/p&gt;</comment>
                    <comment id="27676" author="steveminer@gmail.com" created="Mon, 6 Feb 2012 08:33:11 -0600"  >&lt;p&gt;java.util.TimeZone/setDefault could be used for testing in various timezones.&lt;/p&gt;</comment>
                    <comment id="27677" author="steveminer@gmail.com" created="Mon, 6 Feb 2012 08:37:12 -0600"  >&lt;p&gt;Regarding the patch: SimpleDateFormat is a relatively heavy-weight object, so it seems bad to allocate one every time you print a Date.  Unfortunately, SimpleDateFormat is not thread-safe, so you can&apos;t just share one.  The Java world seems to agree that you should use JodaTime instead, but if you&apos;re stuck with the JDK, you need to have a ThreadLocal SimpleDateFormat. I&apos;m working on my own patch along those lines.&lt;/p&gt;</comment>
                    <comment id="27683" author="fogus" created="Mon, 6 Feb 2012 19:38:17 -0600"  >&lt;p&gt;Excellent analysis.  I&apos;ll keep track of this case and vet any patches that come along.  Please do attach a regression test if possible.&lt;/p&gt;</comment>
                    <comment id="27684" author="cosmin" created="Mon, 6 Feb 2012 20:39:09 -0600"  >&lt;p&gt;I attached a new patch using a SimpleDateFormat per thread using a thread local. I&apos;ll try to add some tests next.&lt;/p&gt;</comment>
                    <comment id="27687" author="cosmin" created="Mon, 6 Feb 2012 22:42:01 -0600"  >&lt;p&gt;A combined patch that uses a thread local SimpleDateFormat, tests round-tripping at a known daylight savings point (by overriding the default timezone) and checks round tripping at multiple points throughout the year (every hour of the first 4 weeks of every month of the year).&lt;/p&gt;

&lt;p&gt;Steve, thanks for the suggestions on using a thread local and TimeZone/setDefault.&lt;/p&gt;</comment>
                    <comment id="27690" author="steveminer@gmail.com" created="Tue, 7 Feb 2012 13:32:11 -0600"  >&lt;p&gt;I filed &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-928&quot; title=&quot;instant literal for Date and Timestamp should print in UTC&quot;&gt;&lt;del&gt;CLJ-928&lt;/del&gt;&lt;/a&gt; with my patch for fixing the printing of Date and Timestamp using UTC.  I copied the tests from the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-926&quot; title=&quot;Instant literals do not round trip correctly&quot;&gt;&lt;del&gt;CLJ-926&lt;/del&gt;&lt;/a&gt; patch to make sure we&apos;re compatible.&lt;/p&gt;</comment>
                    <comment id="27692" author="fogus" created="Tue, 7 Feb 2012 15:11:58 -0600"  >&lt;p&gt;Thanks for the regression test also.  I&apos;ll vett this patch ASAP.&lt;/p&gt;</comment>
                    <comment id="27741" author="fogus" created="Fri, 17 Feb 2012 13:24:09 -0600"  >&lt;p&gt;Seems reasonable to me.&lt;/p&gt;</comment>
                    <comment id="27744" author="stuart.sierra" created="Fri, 17 Feb 2012 13:46:25 -0600"  >&lt;p&gt;Vetted. Will apply later.&lt;/p&gt;</comment>
                    <comment id="27746" author="stuart.sierra" created="Fri, 17 Feb 2012 13:56:49 -0600"  >&lt;p&gt;Not Vetted. Test. That thing.&lt;/p&gt;</comment>
                    <comment id="27749" author="stuart.sierra" created="Fri, 17 Feb 2012 14:10:14 -0600"  >&lt;p&gt;No, it&apos;s &quot;Screened,&quot; not &quot;Test.&quot; Somebody save me.&lt;/p&gt;</comment>
                    <comment id="27760" author="stuart.sierra" created="Fri, 17 Feb 2012 15:55:14 -0600"  >&lt;p&gt;Superseded by &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-928&quot; title=&quot;instant literal for Date and Timestamp should print in UTC&quot;&gt;&lt;del&gt;CLJ-928&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10895" name="CLJ-926-round-trip-date-instants-with-tests.patch" size="5506" author="cosmin" created="Mon, 6 Feb 2012 22:42:01 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10004">Screened</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>stuart.sierra</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-889] Specifically allow &apos;.&apos; inside keywords</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-889</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The documentation for keywords (on page &lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt;) specifically states that &apos;.&apos; is not allowed as part of a keyword name; however &apos;.&apos; is specifically useful.  For example, several web frameworks for Clojure use keywords to represent HTML elements, using CSS selector syntax (i.e., :div.important is equivalent to &amp;lt;div class=&apos;important&apos;&amp;gt;).&lt;/p&gt;

&lt;p&gt;In any case, the use of &apos;.&apos; is not checked by the reader and it is generally useful.&lt;/p&gt;

&lt;p&gt;I would like to see &apos;.&apos; officially allowed (in the documentation).  Further, I&apos;d like to see additional details about which punctuation characters are allowed (my own web framework uses &apos;&amp;amp;&apos;, &apos;?&apos; and &apos;&amp;gt;&apos; inside keywords for various purposes ... again, current reader implementation does not forbid this, but if a future reader will reject it, I&apos;d like to know now).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15043">CLJ-889</key>
            <summary>Specifically allow &apos;.&apos; inside keywords</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>keywords</label>
                        <label>reader</label>
                    </labels>
                <created>Thu, 1 Dec 2011 11:09:04 -0600</created>
                <updated>Mon, 15 Apr 2013 05:56:25 -0500</updated>
                                                    <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="27427" author="hlewisship" created="Thu, 8 Dec 2011 15:37:26 -0600"  >&lt;p&gt;To clarify, Hiccup and Cascade both use keywords containing &apos;#&apos; and &apos;.&apos;  Cascade goes further, using &apos;&amp;amp;&apos; (to represent HTML entities), &apos;&amp;gt;&apos;, and (possibly in the future) &apos;?&apos;.&lt;/p&gt;</comment>
                    <comment id="29735" author="devn" created="Sat, 20 Oct 2012 18:46:53 -0500"  >&lt;p&gt;I think the EDN spec mitigates some of the concern, but as of yet the official clojure.org reader documentation does not reflect the language used in the description of EDN. Where does EDN stand right now? Can the description being used on the github page be pulled over to clojure.org?&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/edn-format/edn#keywords&quot;&gt;https://github.com/edn-format/edn#keywords&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://clojure.org/reader#The&quot;&gt;http://clojure.org/reader#The&lt;/a&gt; Reader--extensible data notation (edn)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="30962" author="hlewisship" created="Mon, 15 Apr 2013 05:56:25 -0500"  >&lt;p&gt;Unfortunately, the EDN specification does not mention &apos;&amp;gt;&apos;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>