<!-- 
RSS generated by JIRA (4.4#649-r158309) at Fri May 24 18:20:34 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/si/jira.issueviews:issue-xml/CLJ-890/CLJ-890.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-890] Tagged literals in reader</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-890</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;http://dev.clojure.org/display/design/Tagged+Literals&quot;&gt;http://dev.clojure.org/display/design/Tagged+Literals&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15045">CLJ-890</key>
            <summary>Tagged literals in 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="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Dec 2011 17:15:43 -0600</created>
                <updated>Fri, 1 Mar 2013 12:47:02 -0600</updated>
                    <resolved>Fri, 3 Feb 2012 09:12:01 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27411" author="stuart.sierra" created="Fri, 2 Dec 2011 17:32:48 -0600"  >&lt;p&gt;Rough draft in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-890&quot; title=&quot;Tagged literals in reader&quot;&gt;&lt;del&gt;CLJ-890&lt;/del&gt;&lt;/a&gt;-001.patch:&lt;/p&gt;

&lt;p&gt;This adds reader tags like &lt;tt&gt;#user/foo&lt;/tt&gt;. If the symbol following the &lt;tt&gt;#&lt;/tt&gt; is namespace-qualified, or if it is one of a predefined set of built-in tags (currently empty) it is interpreted as a tag. Otherwise, it is interpreted as a class name, as in defrecord literals.&lt;/p&gt;

&lt;p&gt;The dynamic Var &lt;tt&gt;&amp;#42;data-readers&amp;#42;&lt;/tt&gt; is a map from tags (symbols) to reader functions/Vars. Each invocation of &lt;tt&gt;Compiler.load&lt;/tt&gt; creates a new thread-local binding, as does the REPL. At the top of a source file, use &lt;tt&gt;(set! &amp;#42;data-readers&amp;#42; ...)&lt;/tt&gt; to define the tags just for that file. For runtime invocations of the reader, use &lt;tt&gt;binding&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;When reading a tagged literal, if the tag is &lt;b&gt;not&lt;/b&gt; defined in &lt;tt&gt;&amp;#42;data-readers&amp;#42;&lt;/tt&gt; it is added as &lt;tt&gt;:data&lt;/tt&gt; metadata on the following form. If the following form does not support metadata, the tag is ignored. This causes a problem when an undefined tag is used in source code, because the compiler tries to evaluate it:&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; #foo.bar/bar {:a 1}
CompilerException java.lang.RuntimeException: No such &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;: foo.bar/bar, compiling:(NO_SOURCE_PATH:0) 
user=&amp;gt; (quote #foo.bar/bar {:a 1})
{:a 1}
user=&amp;gt; (meta *1)
{:data foo.bar/bar}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="27445" author="stuart.sierra" created="Fri, 9 Dec 2011 15:08:23 -0600"  >&lt;p&gt;New file &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-890&quot; title=&quot;Tagged literals in reader&quot;&gt;&lt;del&gt;CLJ-890&lt;/del&gt;&lt;/a&gt;-002.patch:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;tag definitions loaded from &lt;tt&gt;/data_readers.clj&lt;/tt&gt; files on classpath&lt;/li&gt;
	&lt;li&gt;read as a series of symbol-symbol pairs&lt;/li&gt;
	&lt;li&gt;&quot;target&quot; symbol interpreted as a Var&lt;/li&gt;
	&lt;li&gt;creates namespaces and interns Vars as necessary&lt;/li&gt;
	&lt;li&gt;may be more than one file&lt;/li&gt;
	&lt;li&gt;throws exception on conflict&lt;/li&gt;
	&lt;li&gt;sets root binding of &lt;tt&gt;&amp;#42;data-readers&amp;#42;&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="27557" author="stuart.sierra" created="Fri, 13 Jan 2012 08:28:23 -0600"  >&lt;p&gt;Patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-890&quot; title=&quot;Tagged literals in reader&quot;&gt;&lt;del&gt;CLJ-890&lt;/del&gt;&lt;/a&gt;-002.patch applied following discussion with Rich. Will be included in release 1.4.0-alpha4&lt;/p&gt;</comment>
                    <comment id="29200" author="bbloom" created="Thu, 16 Aug 2012 21:48:08 -0500"  >&lt;p&gt;It would be a small extension to allow overriding of readers for untagged forms as well.&lt;/p&gt;

&lt;p&gt;For example, MapReader currently calls RT.map(a) when it could call RT.get(data_readers, MAP_TAG).invoke(a)&lt;/p&gt;

&lt;p&gt;This would allow consumers of the reader to supply their own implementations for any basic data structure. Not that anyone is likely to have a &lt;b&gt;better&lt;/b&gt; map/set/etc, but I could see it being useful for using a different RegExp engine or something like that. The primary use case I have in mind, however, is the ClojureScript compiler. The compiler needs to know the &lt;b&gt;order&lt;/b&gt; of the key-value-pairs in a map or the elements in a set. See &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-288&quot; title=&quot;Compilation of unordered collections &quot;&gt;CLJS-288&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10731" name="CLJ-890-001.patch" size="4945" author="stuart.sierra" created="Fri, 2 Dec 2011 17:32:48 -0600" />
                    <attachment id="10737" name="CLJ-890-002.patch" size="6626" author="stuart.sierra" created="Fri, 9 Dec 2011 15:08:23 -0600" />
                </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>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>