<!--
RSS generated by JIRA (4.4#649-r158309) at Mon May 20 01:52:22 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+CLJ+AND+resolution+%3D+Unresolved+AND+fixVersion+%3D+%22Release+1.5%22+ORDER+BY+priority+DESC&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+CLJ+AND+resolution+%3D+Unresolved+AND+fixVersion+%3D+%22Release+1.5%22+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="4" total="4"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJ-1154] Compile.java closes out preventing java from reporting exceptions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1154</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I was trying to compile a project that has some native dependencies.  I am using clojure-maven-plugin version 1.3.13 with Maven 2.0.  I forgot to set java.library.path properly so that the native library could be found, and only got an error of&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;[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Clojure failed.
[INFO] ------------------------------------------------------------------------
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I traced this down to Compile.java, where it is flushing and closing &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;out&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; in the finally block.  The JVM uses out to write out a stack trace for any uncaught exceptions.  When out is closed it is unable to write out the stack trace for the UnsatisfiedLinkError that was being thrown.  This made it very difficult to debug what was happening.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15983">CLJ-1154</key>
            <summary>Compile.java closes out preventing java from reporting exceptions</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="revans2">Robert (Bobby) Evans</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Jan 2013 13:04:08 -0600</created>
                <updated>Fri, 12 Apr 2013 09:31:03 -0500</updated>
                                    <version>Release 1.4</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30677" author="stu" created="Fri, 1 Mar 2013 10:45:51 -0600"  >&lt;p&gt;I have encountered this problem as well.  Did not verify the explanation, but sounds reasonable.&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-944] (.containsKey {:one 1} :one) throws Exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-944</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Patch clj944-plus-tests does three things:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;includes the previous &quot;0002&quot; patch which has the compiler emit map types consistent with the reader&lt;/li&gt;
	&lt;li&gt;adds tests&lt;/li&gt;
	&lt;li&gt;removes tests that were broken all along and now symptomatic&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hi guys, I am getting the following exception:&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;(.containsKey {:one 1} :one)
;=&amp;gt; ClassCastException clojure.lang.PersistentArrayMap cannot be &lt;span class=&quot;code-keyword&quot;&gt;cast&lt;/span&gt; to clojure.lang.PersistentHashMap&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The map is a clojure.lang.PersistentArrayMap, which obviously has a containsKey method (&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentArrayMap.java#L95&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentArrayMap.java#L95&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Casting it works fine though:&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;(.containsKey ^clojure.lang.PersistentArrayMap {:one 1} :one)
;=&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The mailing list suggest that the compiler injects an incorrect cast to clojure.lang.PersistentHashMap. In this case it should probably be cast to a clojure.lang.Associative, the highest common interface having the .containsKey method.&lt;/p&gt;

&lt;p&gt;The problem is not present in Clojure 1.2.1.&lt;/p&gt;</description>
                <environment>Clojure 1.3 om Mac OS 10.7, Clojure 1.5.0 alpha1 on Linux x86_64 (OpenJDK 1.7.0 b147)</environment>
            <key id="15259">CLJ-944</key>
            <summary>(.containsKey {:one 1} :one) throws Exception</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="stoyle">Alf Kristian St&#248;yle</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Mar 2012 02:45:09 -0600</created>
                <updated>Sat, 13 Apr 2013 12:06:35 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="29873" author="bronsa" created="Tue, 30 Oct 2012 17:02:10 -0500"  >&lt;p&gt;The attached patch fixes the issue, by emitting IPersistentMap instead of Persistent{Hash|Array}Map as class type for maps literals&lt;/p&gt;</comment>
                    <comment id="29885" author="bronsa" created="Thu, 1 Nov 2012 15:48:45 -0500"  >&lt;p&gt;I uploaded another patch fixing the same problem in a different way.&lt;br/&gt;
While 0001-Fix-for-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-944&quot; title=&quot;(.containsKey {:one 1} :one) throws Exception&quot;&gt;CLJ-944&lt;/a&gt;.patch makes clojure.lang.Complier.ConstantExpr#getJavaClass return clojure.lang.IPersistentMap for both clojure.lang.PersistentHashMap and clojure.lang.PersistentArrayMap, 0002-Fix-for-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-944&quot; title=&quot;(.containsKey {:one 1} :one) throws Exception&quot;&gt;CLJ-944&lt;/a&gt;.patch makes clojure.lang.Compiler.MapExpr#parse return a PersistentArrayMap if the length is &amp;lt;= HASHTABLE_THRESHOLD, instead of always returning a PersistentHashMap.&lt;/p&gt;

&lt;p&gt;This approach is more consistent, making the type of the compiler&apos;s internal representation of a map literal equal to the one of the reader.&lt;/p&gt;

&lt;p&gt;Note that this second approach while being more consistent, breaks some tests that assume some operations on maps (specifically `seq` and `print`) to be order dependent, and written with the hash-map return order implementation in mind.&lt;/p&gt;

&lt;p&gt;That should not be the case and if the second patch is preferred over the first one, I&apos;ll gladly fix those tests.&lt;/p&gt;</comment>
                    <comment id="30678" author="stu" created="Fri, 1 Mar 2013 12:09:44 -0600"  >&lt;p&gt;Approach #2, relying on consistent choice of concrete map class by size throughout, feels quite fragile.&lt;/p&gt;

&lt;p&gt;Approach #1 seems to abuse the method name getJavaClass(), now having it return &quot;get the base type I would need for cast&quot;.&lt;/p&gt;

&lt;p&gt;Maybe there needs to be a different thing entirely?&lt;/p&gt;</comment>
                    <comment id="30684" author="bronsa" created="Fri, 1 Mar 2013 14:17:09 -0600"  >&lt;p&gt;Patch #2 should get merged (IMHO) regardless of the fragility of its approach to fixing this ticket&apos;s bug, since it fixes another bug:&lt;/p&gt;

&lt;p&gt;prior to the patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (class {:a 1})&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;br/&gt;
user=&amp;gt; (def a {:a 1})&lt;br/&gt;
#&apos;user/a&lt;br/&gt;
user=&amp;gt; (class a)&lt;br/&gt;
clojure.lang.PersistentHashMap&lt;/p&gt;

&lt;p&gt;after the patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (class {:a 1})&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;br/&gt;
user=&amp;gt; (def a {:a 1})&lt;br/&gt;
#&apos;user/a&lt;br/&gt;
user=&amp;gt; (class a)&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;/p&gt;

&lt;p&gt;This should also lead to some &lt;b&gt;minor&lt;/b&gt; performance enhancement since prior to this moment, every map def&apos;ed would be a HashMap instead of an ArrayMap&lt;/p&gt;

&lt;p&gt;So, I think patch #2 should be applied if not for this ticket&apos;s bug, at least for the reason stated above.&lt;br/&gt;
If somebody has any proposal for making this patch more solid regarding this ticket&apos;s bug, any help is welcome&lt;/p&gt;</comment>
                    <comment id="30949" author="richhickey" created="Sat, 13 Apr 2013 09:41:58 -0500"  >&lt;p&gt;This should not have passed screening. There are two issues, should be separate. I have no idea what has been screened nor what will be applied should it be approved. There&apos;s contention in the discussion but no resolution.&lt;/p&gt;</comment>
                    <comment id="30950" author="bronsa" created="Sat, 13 Apr 2013 12:06:35 -0500"  >&lt;p&gt;I don&apos;t think that there are two issues here.&lt;br/&gt;
The issue is only one: the compiler doesn&apos;t emit maps in a way consistent with what the reader returns and with how the compiler itself uses maps.&lt;br/&gt;
The symptoms are two: some interop calls fail, and def&apos;ed vars with a literal map as value never use a PersistentArrayMap.&lt;/p&gt;

&lt;p&gt;The underlying cause of those two symtoms is fixed by the patch 002 that i submitted (incorporated in Stu&apos;s clj944-plus-tests patch.&lt;/p&gt;

&lt;p&gt;Stuart said that this approach feels fragile but the bug is caused by the fact that everywhere else clojure returns a PersistentArrayMap when the element count is &amp;lt;= than the PersistentHashMap threshold, and when emitting maps, it doesn&apos;t.&lt;/p&gt;

&lt;p&gt;Making clojure emit maps consistently with how clojure does internally everywhere else looks to me like the only solution, and I don&apos;t really see how making clojure consistent is a fragile approach.&lt;/p&gt;

&lt;p&gt;But again, if somebody can suggest a better solution to this problem, I&apos;ll gladly submit another patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11644" name="0001-Fix-for-CLJ-944.patch" size="879" author="bronsa" created="Tue, 30 Oct 2012 17:02:10 -0500" />
                    <attachment id="11655" name="0002-Fix-for-CLJ-944.patch" size="1094" author="bronsa" created="Thu, 1 Nov 2012 15:48:45 -0500" />
                    <attachment id="11955" name="clj944-plus-tests.patch" size="4827" author="stu" created="Fri, 12 Apr 2013 15:57:36 -0500" />
                </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>

<item>
            <title>[CLJ-1161] sources jar has bad versions.properties resource</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1161</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The &quot;sources&quot; jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:&lt;/p&gt;

&lt;p&gt;version=${version}&lt;/p&gt;

&lt;p&gt;The regular Clojure jar has the correct version string in that resource.&lt;/p&gt;

&lt;p&gt;I came across a problem when I was experimenting with the sources jar (as used by IDEs).  I naively added the sources jar to my classpath, and Clojure died on start up.  The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16001">CLJ-1161</key>
            <summary>sources jar has bad versions.properties resource</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="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Mon, 11 Feb 2013 10:03:01 -0600</created>
                <updated>Fri, 12 Apr 2013 09:36:58 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30577" author="steveminer@gmail.com" created="Mon, 11 Feb 2013 10:04:27 -0600"  >&lt;p&gt;Notes from the dev mailing list:&lt;/p&gt;

&lt;p&gt;The &quot;sources&quot; JAR is generated by another Maven plugin, configured here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181&quot;&gt;https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The simplest solution might be to just exclude the file from the sources jar. It looks like maven-source-plugin has an excludes option which would do the trick:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes&quot;&gt;http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11861" name="0001-CLJ-1161-Remove-version.properties-from-sources-JAR.patch" size="1099" author="stuart.sierra" created="Sat, 16 Feb 2013 15:19:33 -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>

<item>
            <title>[CLJ-1018] range&apos;s behavior is inconsistent</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1018</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Problem statement: The current behavior of range is inconsistent. (range 0 9 0) has always produced (). (range 0 9 -1) has always produced (). (range 9 0 1) has always produced (). However, (range 9 0 0) produces (9 9 9 9 ...), and (range 0 0 0) produces &apos;(0 0 0 0 ...)&lt;/p&gt;

&lt;p&gt;Proposal: Make the behavior of range consistent when using a step of 0 to make it produce an empty list.&lt;/p&gt;

&lt;p&gt;Please see attached code and patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15557">CLJ-1018</key>
            <summary>range&apos;s behavior is inconsistent</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="devn">Devin Walters</reporter>
                        <labels>
                        <label>patch</label>
                        <label>range</label>
                    </labels>
                <created>Fri, 29 Jun 2012 16:25:03 -0500</created>
                <updated>Fri, 12 Apr 2013 09:59:12 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28925" author="mikera" created="Sun, 1 Jul 2012 04:08:00 -0500"  >&lt;p&gt;Agree it is good to fix the inconsistency, but I think an infinite sequence of zeros is the correct result, as implied by the current docstring definition.&lt;/p&gt;

&lt;p&gt;It&apos;s also mathematically cleanest: range should produce an arithmetic progression until the end value is equalled or exceeded.&lt;/p&gt;

&lt;p&gt;Empty lists only seem to make sense as a return value when start &amp;gt;= end.&lt;/p&gt;</comment>
                    <comment id="28928" author="devn" created="Sun, 1 Jul 2012 12:36:08 -0500"  >&lt;p&gt;Hi Mike,&lt;/p&gt;

&lt;p&gt;Could you explain how you think the docstring definition implies this behavior? Maybe I&apos;m missing something, but I was surprised. For instance, in the case of (range 3 9 0), if start were truly inclusive as the docstring says, the result would be (3), not ().&lt;/p&gt;

&lt;p&gt;You mentioned that you think the infinite sequence of 0&apos;s is consistent and in keeping with the definition of range. I&apos;m not sure I agree. (0,0] is an empty set of length zero, and [0,0) is an empty set of length zero.&lt;/p&gt;

&lt;p&gt;You state that empty list only makes sense for start &amp;gt;= end, except this is not the current behavior. Could you help me understand what you believe the appropriate behavior would be in each of the following three cases? (range 0 10 0), (range 10 0 0), and (range 0 0 0)?&lt;/p&gt;

&lt;p&gt;A few options to consider:&lt;br/&gt;
1) Fix the docstring to reflect the actual behavior of range.&lt;br/&gt;
2) Handle the case of (range 9 3 0) =&amp;gt; (9 9 9 ...) to make it consistent with the behavior of (range 3 9 0) =&amp;gt; ()&lt;br/&gt;
3) Stop allowing a step of zero altogether.&lt;/p&gt;

&lt;p&gt;Editing to Add (Note: I don&apos;t think the way someone else did something is always the right way, just wanted to do some digging on how other people have handled this in the past):&lt;br/&gt;
&lt;a href=&quot;http://docs.python.org/library/functions.html#range&quot;&gt;http://docs.python.org/library/functions.html#range&lt;/a&gt; (0 step returns ValueError)&lt;br/&gt;
&lt;a href=&quot;http://www2.tcl.tk/10797&quot;&gt;http://www2.tcl.tk/10797&lt;/a&gt; (range returns empty list for a zero step)&lt;br/&gt;
&lt;a href=&quot;http://www.scala-lang.org/api/2.7.7/scala/Range.html&quot;&gt;http://www.scala-lang.org/api/2.7.7/scala/Range.html&lt;/a&gt; (zero step is not allowed)&lt;/p&gt;</comment>
                    <comment id="28956" author="jimpil" created="Thu, 5 Jul 2012 16:13:22 -0500"  >&lt;p&gt;It does make sense NOT to allow a step of zero (at least to me)... I wasn&apos;t going to say anything about this but if other popular languages do not allow 0, then I guess it makes more sense than I originally gave myself credit for... However, if we want to be mathematically correct then the answer would be to return an infinte seq with the start value like below. After all, what  is a step of 0? does it  make any difference how many steps you take if with every step you cover 0 distance? obviously not...you start from x and you stay at x forever...we do have repeat for this sort of thing though... &lt;/p&gt;

&lt;p&gt;(take 5 (range 3 9 0)) =&amp;gt; (3 3 3 3 3)&lt;/p&gt;

&lt;p&gt;+1 for not allowing 0 step&lt;/p&gt;</comment>
                    <comment id="28958" author="mikera" created="Sun, 8 Jul 2012 08:49:11 -0500"  >&lt;p&gt;@Devin quite simple: a lazy sequence of nums starting from x with step 0.0 until it reaches an end value of y (where y &amp;gt; x) is an infinite sequence of x.&lt;/p&gt;

&lt;p&gt;Consider the case where start is 0 and end is infinity (the default), you would expect sequences to go as follows:&lt;/p&gt;

&lt;p&gt;step +2 : 0  2  4  6  8....&lt;br/&gt;
step +1 : 0  1  2  3  4....&lt;br/&gt;
step +0 : 0  0  0  0  0....&lt;/p&gt;

&lt;p&gt;It would be inconsistent to make 0 a special case, all of these are valid arithmetic progressions. And all of these are consistent with the current docstring.&lt;/p&gt;

&lt;p&gt;If you make 0 a special case, then people will need to write special case code to handle it. Consider the code to create a multiplication table for example:&lt;/p&gt;

&lt;p&gt;(for &lt;span class=&quot;error&quot;&gt;&amp;#91;x (range 10)&amp;#93;&lt;/span&gt;&lt;br/&gt;
     (take 10 (range 0 Long/MAX_VALUE x)))&lt;/p&gt;

&lt;p&gt;This works fine if you produce an infinite sequence of zeros for step 0, but fails if you create an empty list as a special case for step 0.&lt;/p&gt;

&lt;p&gt;As a related issue, I&apos;d personally also favour negative step sizes also producing an infinite sequence. If we don&apos;t want to allow this though, then at least the docstring should be changed to say &quot;a lazy seq of non-decreasing nums&quot; and a negative step should throw an error.&lt;/p&gt;</comment>
                    <comment id="28959" author="devn" created="Mon, 9 Jul 2012 19:09:16 -0500"  >&lt;p&gt;Carrying over a message from the clojure-dev list by Stuart Sierra:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I called the ticket a defect. Does that seem reasonable?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;yes&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Does anyone actually use the 0 step behavior in their programs?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;not if they have any sense&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Has anyone been bitten by this in the past?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;not me&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Is this behavior intentional for some historical reason I don&apos;t know about or understand?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I doubt it.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Has this been brought up before? I couldn&apos;t find any reference to it via Google.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Not that I know of.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Are there performance implications to my patch?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I doubt it. Lazy seqs are not ideal for high-performance code anyway.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Am I addressing a symptom rather than the problem?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think the &lt;b&gt;problem&lt;/b&gt; is that the result of `range` with a step of 0 was never specified. Don&apos;t assume that the tests are specifications. Many of the tests in Clojure were written by over-eager volunteers who defined the tests based on whatever the behavior happened to be. The only specification from the language designer is the docstring. By my reading, that means that `range` with a step of 0 should return an infinite seq of the start value, unless the start and end values are equal.&lt;/p&gt;

&lt;p&gt;-S&lt;/p&gt;</comment>
                    <comment id="28960" author="devn" created="Mon, 9 Jul 2012 19:10:24 -0500"  >&lt;p&gt;Carrying over a message by Michal Marczyk:&lt;/p&gt;

&lt;p&gt;With a negative step, the comparison is reversed, so that e.g.&lt;/p&gt;

&lt;p&gt;(range 3 0 -1)&lt;/p&gt;

&lt;p&gt;evaluates to&lt;/p&gt;

&lt;p&gt;(3 2 1)&lt;/p&gt;

&lt;p&gt;I think this is the useful behaviour; the docstring should perhaps be&lt;br/&gt;
adjusted to match it.&lt;/p&gt;

&lt;p&gt;Agreed on zero step.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Micha&#322;&lt;/p&gt;</comment>
                    <comment id="29014" author="devn" created="Fri, 20 Jul 2012 17:10:19 -0500"  >&lt;p&gt;Adding a new patch after hearing comments. This patch makes (range 9 3 0) =&amp;gt; (9 9 9 9 ...), (range 3 9 0) =&amp;gt; (3 3 3 3 ...), and () will be returned when (= start end). Also updated the docstring.&lt;/p&gt;</comment>
                    <comment id="30065" author="halgari" created="Tue, 27 Nov 2012 15:01:11 -0600"  >&lt;p&gt;Marking as vetted&lt;/p&gt;</comment>
                    <comment id="30066" author="halgari" created="Tue, 27 Nov 2012 15:04:24 -0600"  >&lt;p&gt;Patch applies cleanly. We&apos;ve discussed this issue to death (for as simple as it is). I think it&apos;s time to mark it as screened. &lt;/p&gt;</comment>
                    <comment id="30067" author="halgari" created="Tue, 27 Nov 2012 15:06:27 -0600"  >&lt;p&gt;For some reason I&apos;m not allowed to edit the attachments list. When you apply the patch, please apply inconsistent_range_fix.diff as that is the most recent version of the fix. &lt;/p&gt;</comment>
                    <comment id="30194" author="richhickey" created="Sun, 9 Dec 2012 06:44:10 -0600"  >&lt;p&gt;As someone who has to read these tickets, I&apos;d really appreciate it if you could keep the description up to date and accurate, with examples of the current and intended behavior and the strategy to be used in fixing. I can&apos;t follow every thread to see what the latest thinking is, especially on a patch like this where the original mission was changed.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="30207" author="devn" created="Mon, 10 Dec 2012 15:53:31 -0600"  >&lt;p&gt;@Tim: I&apos;ve removed the other attachments.&lt;/p&gt;

&lt;p&gt;@Rich: Understood. I will update the description this evening.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11393" name="inconsistent_range_fix.diff" size="1944" author="devn" created="Fri, 20 Jul 2012 17:10:19 -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>
</channel>
</rss>