<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sat May 25 17:14:40 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-717/CLJ-717.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-717] A range function for characters, char-range</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-717</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve seen a lot of cases where people would do stuff like this:&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;(def alphabet &quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or other equally meh things in order to get a range of characters. Haskell&apos;s range supports creating ranges of characters, so that was inspiration for this addition.&lt;/p&gt;

&lt;p&gt;I&apos;ve created a function that is the analogue of range for characters. I&apos;ve called it char-range. It works almost precisely the same as range (and uses range under the hood), only the upper bound isn&apos;t exclusive. It made more sense to me for it to be inclusive, so that things like &lt;tt&gt;(char-range \a \z)&lt;/tt&gt; work and make sense.&lt;/p&gt;

&lt;p&gt;It takes the same argument combinations as range. For no arguments, it produces a lazy sequence of characters from Character/MIN_VALUE to Character/MAX_VALUE. For two arguments, it produces a lazy sequence from Character/MIN_VALUE to end. It allows for the same stepping that range allows for as well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14330">CLJ-717</key>
            <summary>A range function for characters, char-range</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="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="anthonysimpson">Anthony Simpson</reporter>
                        <labels>
                    </labels>
                <created>Sat, 15 Jan 2011 07:11:10 -0600</created>
                <updated>Sun, 16 Jan 2011 09:12:39 -0600</updated>
                    <resolved>Sat, 15 Jan 2011 16:33:37 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26135" author="anthonysimpson" created="Sat, 15 Jan 2011 10:29:06 -0600"  >&lt;p&gt;A friend pointed out to me that I shouldn&apos;t have set the issue&apos;s approval to &apos;Test&apos;. I took &quot;If the ticket has (or you write) a patch that applies, test it. If it seems to work, set the status to &quot;Test.&quot;&quot; out of context. I don&apos;t see a way to set the Approval back to &quot;None&quot;, so I&apos;m just going to apologize and whistle.&lt;/p&gt;</comment>
                    <comment id="26137" author="stu" created="Sat, 15 Jan 2011 16:30:18 -0600"  >&lt;p&gt;Before implementing a feature like this, please document the problem and the other possible solutions/variants. Some things to think about:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;is the alphabet example a one-off, or representative of a family of things that are causing real pain?
	&lt;ul&gt;
		&lt;li&gt;wouldn&apos;t alphabet be less readable as a range? You&apos;d have to use two ranges, and know the character after Z&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;we already have range, this would add char-range. Are other things rangeable?
	&lt;ul&gt;
		&lt;li&gt;Haskell comparison useful&lt;/li&gt;
		&lt;li&gt;more so if expanded to a few other languages&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;if rangeable-ness is going to extend to non-numeric things, should it be polymorphic, instead of separate functions?&lt;/li&gt;
	&lt;li&gt;is rangeable-ness a categoric thing, like Comparable?
	&lt;ul&gt;
		&lt;li&gt;if so, are there ever types that might range in more than one way&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;what are the performance/needs and expectations of char-range users? At a glance, this patch uses higher-order fns and a fair amount of boxing, where the existing range fn is built in a lower-level way.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you want, please start a design discussion at &lt;a href=&quot;http://dev.clojure.org/display/design/Home&quot;&gt;http://dev.clojure.org/display/design/Home&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26138" author="scott" created="Sat, 15 Jan 2011 18:14:21 -0600"  >&lt;p&gt;It&apos;s a lot easier to tell that &lt;tt&gt;(char-range \a \z)&lt;/tt&gt; is correct than &lt;tt&gt;&quot;abcdefghijkmnopqrstuvwxyz&quot;&lt;/tt&gt; (did you notice the missing character at a glance?). &lt;/p&gt;

&lt;p&gt;Why would you need to know the character after Z? The OP clearly said the upper bound would be inclusive.&lt;/p&gt;

&lt;p&gt;As for performance, &lt;tt&gt;char-range&lt;/tt&gt; uses the functions &lt;tt&gt;map&lt;/tt&gt; and &lt;tt&gt;range&lt;/tt&gt; which are themselves built in a fast low-level way, so as long as they perform well, so will &lt;tt&gt;char-range&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="26139" author="stu" created="Sun, 16 Jan 2011 09:12:39 -0600"  >&lt;p&gt;So range will be exclusive while char-range will be inclusive? Tough sell. You will need more motivation that this one example.&lt;/p&gt;

&lt;p&gt;I am not saying this couldn&apos;t be the right patch. I am saying that the hard part is answering the design questions, which has to come first. Also, threaded comments on a patch isn&apos;t the best place to do it. If char-range is important enough to you, then please start a design page under &lt;a href=&quot;http://dev.clojure.org/display/design/Home&quot;&gt;http://dev.clojure.org/display/design/Home&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10080" name="char-range.diff" size="1184" author="anthonysimpson" created="Sat, 15 Jan 2011 07:11:10 -0600" />
                </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>