Whither Tango?

Jonathan M Davis jmdavisProg at gmail.com
Sat Feb 20 19:44:51 PST 2010


Rainer Deyke wrote:

> On 2/20/2010 19:55, Jonathan M Davis wrote:
>> I think that makeRange or range would be _highly_ confusing given how the
>> term range is used in D, and personally, I wouldn't find it much clearer
>> anyway.
> 
> 'makeRange' is descriptive.  That's what the function does.  It creates
> and returns a range, in the D sense of the word "range".

Well, technically speaking, it returns a Sequence, but a Sequence is a 
range. In that case, perhaps makeSequence or genSequence would work.

> 
>> And can python's range allow for steps greater than 1 between
>> numbers?
> 
> Yes.  I even included an example of that in my previous post.
> 
> 

Too true. I thought that I had looked, but apparently I wasn't observant 
enough. Sorry about that. I still question that it's wise to use range or 
makeRange in this case though.

I don't know. I find iota to be a fairly bizarre name, bit it's highly 
memorable. I'll remember it far more easily than I would something like 
makeSequence or makeRange. And the fact that iota is used for this purpose 
in other languages certainly gives substance to the argument for keeping it 
- though just because another language does something in a particular manner 
doesn't mean that D should.

- Jonathan M Davis



More information about the Digitalmars-d mailing list