<!-- 
RSS generated by JIRA (4.4#649-r158309) at Thu Jun 20 02:37:16 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/CLJS-210/CLJS-210.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>[CLJS-210] Implement Var form, var-get, and var? in CLJS</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-210</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;See discussion of Vars in CLJS here: &lt;a href=&quot;http://dev.clojure.org/display/design/Dynamic+Binding&quot;&gt;http://dev.clojure.org/display/design/Dynamic+Binding&lt;/a&gt;&lt;br/&gt;
My goal is to eventually implement dynamic scope capture, via bound-fn and friends. The attached patch is a step in that direction.&lt;/p&gt;

&lt;p&gt;This patch adds support for parsing the (var foo) form. The #&apos; reader macro is provided by JVM Clojure.&lt;/p&gt;

&lt;p&gt;#&apos;foo emits code to construct a Var object. In this patch, each invocation of &apos;var will create a unique Var object. This means they are &apos;= by fully qualified symbol, but not &apos;identical?. Simple memoization would fix that, but I&apos;m not going to bother until I get to Dynamic Var objects.&lt;/p&gt;

&lt;p&gt;The main advantage of this level of Var support is for the interactive development convenience of being able to defer dereferencing top-levels. For example, (def fog (comp f #&apos;g)) will pick up redefinitions of &apos;g, but not of &apos;f.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15372">CLJS-210</key>
            <summary>Implement Var form, var-get, and var? in CLJS</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="bbloom">Brandon Bloom</reporter>
                        <labels>
                        <label>patch,</label>
                    </labels>
                <created>Fri, 27 Apr 2012 22:51:28 -0500</created>
                <updated>Sun, 28 Oct 2012 21:03:58 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28306" author="bbloom" created="Sat, 28 Apr 2012 22:07:59 -0500"  >&lt;p&gt;I found two issues with this patch:&lt;/p&gt;

&lt;p&gt;1) I never used the IVar that I declared :-P&lt;/p&gt;

&lt;p&gt;2) (apply #&apos;+ (range 100)) throws &quot;Invalid arity: 101&quot; &amp;#8211; this is related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-211&quot;&gt;http://dev.clojure.org/jira/browse/CLJS-211&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ll look into fixing both. However, we should discuss supporting variable arity protocol methods...&lt;/p&gt;</comment>
                    <comment id="28843" author="dnolen" created="Sun, 17 Jun 2012 12:17:02 -0500"  >&lt;p&gt;any support for reified vars is a low priority for the foreseeable future.&lt;/p&gt;</comment>
                    <comment id="29336" author="bbloom" created="Sat, 1 Sep 2012 19:46:14 -0500"  >&lt;p&gt;Reified vars (and binding frames!) are a requirement for a CPS transform to be correct with respect to dynamic bindings.&lt;/p&gt;</comment>
                    <comment id="29419" author="tomoj" created="Mon, 10 Sep 2012 17:11:30 -0500"  >&lt;p&gt;+1 towards bound-fn and friends. I had an explanation written here but now I see &quot;async Javascript (ie. nearly all Javascript) makes the binding macro effectively useless without bound-fn&quot;. Indeed.&lt;/p&gt;</comment>
                    <comment id="29850" author="bendlas" created="Sun, 28 Oct 2012 19:34:02 -0500"  >&lt;p&gt;bound-fn could also be implemented by setting / resetting bound vars before / after the wrapped fn, similar to binding. We would just need to add tracking of the currently rebound dynamic vars.&lt;br/&gt;
That should also be CPS - friendly, no?&lt;/p&gt;</comment>
                    <comment id="29858" author="tomoj" created="Sun, 28 Oct 2012 21:03:58 -0500"  >&lt;p&gt;I&apos;ve considered that and would love to see it happen.&lt;/p&gt;

&lt;p&gt;But what about:&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;(def ^:dynamic *foo* 3)
(set! *foo* 4)
(def f (bound-fn [] *foo*))
(set! *foo* 5)
(f)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11118" name="vars1.patch" size="6275" author="bbloom" created="Fri, 27 Apr 2012 22:51:28 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>
</channel>
</rss>