D3 suggestion: rename "range" to "sequence"

Adam Wilson flyboynw at gmail.com
Wed Oct 3 21:30:21 PDT 2012


On Wed, 03 Oct 2012 20:04:06 -0700, Tommi <tommitissari at hotmail.com> wrote:

> Renaming the concept of "range" to "sequence" would make our terminology  
> more consistent with mathematics. It requires typing three more  
> characters, but I think the gained consistency makes it worth it.
>
> http://en.wikipedia.org/wiki/Sequence
>
> I know, not a current issue, but better bring it up now than when it's  
> too late.

I'm not sure I see the value. The computer programming world has settled  
on Range (D isn't the only language to use them). And frankly consistency  
with the programming world is much more important than consistency with  
mathematics which only has a secondary interest in programming as way to  
quickly solve math problems. Programming in mathematics tends to use a  
small subset of the programming language. A general purpose language like  
D has to use general purpose language.

Plus the dictionary definition of "Sequence" states that directionality  
matters. I.E. 1,2,3 read left-to-right has a different meaning than when  
read right-to-left. As Andrei said, ranges can be random access, and  
therefore are, by definition, not sequential.

http://dictionary.reference.com/browse/sequence

IIRC, sequences in mathematics also imply directionality.

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list