<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 06:01:21 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-1165/CLJ-1165.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-1165] Forbid varargs defprotocol/definterface method declarations because those cannot be defined anyway</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1165</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Protocol, interface method declarations don&apos;t allow for varags.  Currently, for 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;  (defprotocol FooBar
    (foo [this &amp;amp; more]))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;compiles just fine, and &lt;tt&gt;&amp;amp;&lt;/tt&gt; is interpreted as a usual argument that happens to be&lt;br/&gt;
named &lt;tt&gt;&amp;amp;&lt;/tt&gt; without special meaning.  But clearly, the user wanted to specify a&lt;br/&gt;
varags parameter here.  The same applies to &lt;tt&gt;definterface&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Similarly, providing method implementations via &lt;tt&gt;defrecord&lt;/tt&gt;, &lt;tt&gt;deftype&lt;/tt&gt;, and &lt;tt&gt;reify&lt;/tt&gt;&lt;br/&gt;
don&apos;t allow for varags (but dynamic extensions via &lt;tt&gt;extend&lt;/tt&gt; do).&lt;/p&gt;

&lt;p&gt;So this patch makes &lt;tt&gt;defprotocol&lt;/tt&gt; and &lt;tt&gt;definterface&lt;/tt&gt; throw an&lt;br/&gt;
&lt;tt&gt;IllegalArgumentException&lt;/tt&gt; if a user tries to use varargs in method signatures.&lt;/p&gt;

&lt;p&gt;Similarly, &lt;tt&gt;defrecord&lt;/tt&gt;, &lt;tt&gt;deftype&lt;/tt&gt;, and &lt;tt&gt;reify&lt;/tt&gt; throw an &lt;tt&gt;IllegalArgumentException&lt;/tt&gt; if&lt;br/&gt;
any method implementation arglist contains a varargs argument.&lt;/p&gt;

&lt;p&gt;This patch is a cut-down variant of my patch to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1024&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1024&lt;/a&gt;&lt;br/&gt;
which has been reverted shortly before Clojure 1.5 was released.  The &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1024&quot; title=&quot;Varargs protococol impls can be defined but not called&quot;&gt;&lt;del&gt;CLJ-1024&lt;/del&gt;&lt;/a&gt; patch&lt;br/&gt;
was the same as this one, but it has also forbidden destructuring in &lt;tt&gt;defprotocol&lt;/tt&gt; and&lt;br/&gt;
&lt;tt&gt;definterface&lt;/tt&gt;.  This was a bit too much, because although destructuring has no&lt;br/&gt;
semantic meaning with method declarations, it still can serve a documentation purpose.&lt;/p&gt;

&lt;p&gt;This has been discussed on the list: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/qjkW-cv8nog/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/qjkW-cv8nog/discussion&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16015">CLJ-1165</key>
            <summary>Forbid varargs defprotocol/definterface method declarations because those cannot be defined anyway</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="stu">Stuart Halloway</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                    </labels>
                <created>Fri, 15 Feb 2013 02:13:32 -0600</created>
                <updated>Thu, 4 Apr 2013 19:24:27 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30834" author="stu" created="Fri, 29 Mar 2013 05:27:06 -0500"  >&lt;p&gt;I think that this patch would be much more helpful to users if it reported the problem form (both name and params). &lt;/p&gt;

&lt;p&gt;(And I wonder if we should be using ex-info for all errors going forward.)&lt;/p&gt;</comment>
                    <comment id="30853" author="tsdh" created="Sun, 31 Mar 2013 05:17:34 -0500"  >&lt;p&gt;New version of the patch that mentions both method name and argument vector, and uses ex-info as Stu suggested.&lt;/p&gt;</comment>
                    <comment id="30874" author="jafingerhut" created="Thu, 4 Apr 2013 19:24:27 -0500"  >&lt;p&gt;Presumuptuously changing Approval from Incomplete back to None, since the reason for marking it Incomplete seems to have been addressed with a new patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11933" name="0001-Protocol-interface-method-declarations-don-t-allow-f.patch" size="3236" author="tsdh" created="Sun, 31 Mar 2013 05:17:34 -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="10001">Code</customfieldvalue>

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