Stupid little iota of an idea

Bruno Medeiros brunodomedeiros+spam at com.gmail
Wed Feb 16 06:33:10 PST 2011


On 11/02/2011 23:55, Andrei Alexandrescu wrote:
> On 2/11/11 7:07 AM, foobar wrote:
>> Andrei Alexandrescu Wrote:
>>
>>>
>>> I don't find the name "iota" stupid.
>>>
>>> Andrei
>>


I want to make a few comments, arising from several different posts in 
this discussion.


First, before this discussion that Ary started, I had heard the "iota" 
function being mentioned a few times in other NG posts, and although I 
wasn't 100% sure of what it did, I did deduce it returned a sequence of 
numbers (in range API).
And also I assumed this number sequence was related to some concept in 
mathematics called iota (like a Fibonacci sequence, or the factors in a 
Taylor series, etc.). I found now that such is not the case, the term 
iota as used in D was introduced by the APL language, but is not defined 
or well-known in mathematics academia.



Generally speaking I agree with with Ary's idea of having better, more 
descriptive names. But I am not sure I agree what would be a better 
alternative.
I find the name "iota" to be meaningless, but "range" for example is 
worse because its meaning conflicts with the general meaning of D 
"ranges". Conflicts in the sense that although iota(...) does return a 
range, it does something quite more specific. I would rather introduce a 
new term ("iota"), than use a confusing or overlapping one like "range" 
(or even "interval").


I might prefer the function to be called "numberSequence" or 
"numberSeq", but I don't yet have a strong enough opinion to actually 
cast a vote.

-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list