October 04, 2012
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.
October 04, 2012
On 04-10-2012 05:04, Tommi 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.

Look, not to sound dismissive, but D3 is not a thing and likely will never be.

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
October 04, 2012
On 10/3/12 11:04 PM, Tommi wrote:
> Renaming the concept of "range" to "sequence" would make our terminology
> more consistent with mathematics.

Ranges are not sequences because e.g. some allow random access.

Andrei

October 04, 2012
On Thursday, 4 October 2012 at 03:10:56 UTC, Alex Rønne Petersen wrote:
> Look, not to sound dismissive, but D3 is not a thing and likely will never be.

Well _I'll_ be dismissive. This idea, even if we were doing
the D3 thing, is completely pointless. D != maths. I don't
know why I have to point that out, but here we are! :P


October 04, 2012
On Thursday, 4 October 2012 at 03:12:21 UTC, Andrei Alexandrescu wrote:
>
> Ranges are not sequences because e.g. some allow random access.

Here are a couple of definitions for a sequence:

1) A sequence is an ordered list of objects (or events).
2) A sequence is a discrete function.
http://en.wikipedia.org/wiki/Sequence

3) A function with domain a set of successive integers
http://wiki.answers.com/Q/What_is_the_definition_fro_sequence_in_math

4) A list of numbers or objects in a special order
http://www.mathsisfun.com/definitions/sequence.html

The definition doesn't seem to consider how the function that defines the sequence is defined, sequentially or algebraically. And often times it's possible to figure out the algebraic correspond to a sequentially defined function.

So, sequence it's like set, except order matters.
http://en.wikipedia.org/wiki/Set_%28mathematics%29

October 04, 2012
On Thursday, 4 October 2012 at 03:39:20 UTC, Bernard Helyer wrote:
>
> Well _I'll_ be dismissive. This idea, even if we were doing
> the D3 thing, is completely pointless. D != maths. I don't
> know why I have to point that out, but here we are! :P

Some (not me) might argue that programming is a branch of mathematics. That aside, consistency makes it so that someone, who knows the term from previous math studies and starts learning programming, is going to have a pretty good idea what the term means even before it's been explained to him.
October 04, 2012
On Thursday, October 04, 2012 06:18:51 Tommi wrote:
> On Thursday, 4 October 2012 at 03:39:20 UTC, Bernard Helyer wrote:
> > Well _I'll_ be dismissive. This idea, even if we were doing the D3 thing, is completely pointless. D != maths. I don't know why I have to point that out, but here we are! :P
> 
> Some (not me) might argue that programming is a branch of mathematics. That aside, consistency makes it so that someone, who knows the term from previous math studies and starts learning programming, is going to have a pretty good idea what the term means even before it's been explained to him.

No matter how close the an idea in mathematics may be to D's ranges, it won't be enough to know how to use them. At minimum, you'd need additional documentation to understand how to use them. And the term range is quite accurate for what we're using it for anyway.

Changing the name would just generate more confusion, and if we were to change it for a hypothetical D3, it would be even worse than changing it now, because by then, way more people would be familiar with the term range. You wouldn't start using a new term for iterators just because you managed to find a term which was ostentsibly better would you? That would just confuse people to no end. And even if it's not that way with ranges quite yet, it'll be close enough by the time we even consider creating a new version of the language.

- Jonathan M Davis
October 04, 2012
On Thursday, 4 October 2012 at 04:30:56 UTC, Jonathan M Davis wrote:
>
> Changing the name would just generate more confusion, and if we were to change
> it for a hypothetical D3, it would be even worse than changing it now, because
> by then, way more people would be familiar with the term range. You wouldn't
> start using a new term for iterators just because you managed to find a term
> which was ostentsibly better would you? That would just confuse people to no
> end. And even if it's not that way with ranges quite yet, it'll be close
> enough by the time we even consider creating a new version of the language.

That's a good point. I guess that train has passed then.

October 04, 2012
On Wed, 03 Oct 2012 20:04:06 -0700, Tommi <tommitissari@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/
October 04, 2012
On 10/3/2012 9:07 PM, Tommi wrote:
> So, sequence it's like set, except order matters.
> http://en.wikipedia.org/wiki/Set_%28mathematics%29

I wish to point out that order doesn't necessarily matter with a range, so there is not a 1:1 correspondence with a sequence.

For example, the ordering of elements in an associative array is arbitrary.
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home