digitalmars.D - D3 suggestion: rename "range" to "sequence"
- Tommi (7/7) Oct 03 2012 Renaming the concept of "range" to "sequence" would make our
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (7/13) Oct 03 2012 Look, not to sound dismissive, but D3 is not a thing and likely will
- Bernard Helyer (5/7) Oct 03 2012 Well _I'll_ be dismissive. This idea, even if we were doing
- Tommi (6/9) Oct 03 2012 Some (not me) might argue that programming is a branch of
- Jonathan M Davis (13/23) Oct 03 2012 No matter how close the an idea in mathematics may be to D's ranges, it ...
- Tommi (3/17) Oct 03 2012 That's a good point. I guess that train has passed then.
- Walter Bright (4/9) Oct 03 2012 Sure, but if there's not an exact 1:1 correspondence, naming them the
- Nick Sabalausky (16/25) Oct 03 2012 It's interesting that the connection between math and programming
- Russel Winder (17/19) Oct 04 2012 D v3 will come if it comes. Implying D3 will never happen is, I believe,
- Andrei Alexandrescu (3/5) Oct 03 2012 Ranges are not sequences because e.g. some allow random access.
- Tommi (16/17) Oct 03 2012 Here are a couple of definitions for a sequence:
- Walter Bright (4/6) Oct 03 2012 I wish to point out that order doesn't necessarily matter with a range,
- Tommi (17/21) Oct 03 2012 Oh, right. I guess in the following function, S would be a
- Jacob Carlborg (4/7) Oct 03 2012 Only if it's uses a hash implementation, which it does in D, I assume.
- Adam Wilson (20/26) Oct 03 2012 I'm not sure I see the value. The computer programming world has settled...
- Walter Bright (3/9) Oct 03 2012 I kinda thought they should have been called "sources" and "sinks", but
- Jonathan M Davis (4/6) Oct 03 2012 Yes, but if we think that it's enough of an improvement, we could probab...
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.
Oct 03 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
Oct 03 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
Oct 03 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! :PSome (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.
Oct 03 2012
On Thursday, October 04, 2012 06:18:51 Tommi wrote:On Thursday, 4 October 2012 at 03:39:20 UTC, Bernard Helyer wrote: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 DavisWell _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! :PSome (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.
Oct 03 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.
Oct 03 2012
On 10/3/2012 9:18 PM, Tommi wrote: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.Sure, but if there's not an exact 1:1 correspondence, naming them the same as mathematical terms can bring along counterintuitive baggage. There's plenty of that already with floating point 'math' !
Oct 03 2012
On Thu, 04 Oct 2012 05:33:31 +0200 "Bernard Helyer" <b.helyer gmail.com> wrote:On Thursday, 4 October 2012 at 03:10:56 UTC, Alex R=F8nne Petersen=20 wrote:It's interesting that the connection between math and programming tends to lead some to consider math stuff more "proper" (maybe because it came first?) and programming more in need of being changed to conform. I think math could use to take a page from programming...specifically the first page of any "intro to programming" book. Ie, the part where it goes over proper variable naming ;) Here's the difference between programmers and mathematicians: A programmer and a mathematician walk into a lab. The programmer says, "Oops, I've run out of letters for variables! I think I'll use readable words." The mathematician had his own solution, but it was Greek to me. Nyuk nyuk nyuk. (Hey, whaddya expect? I'm a programmer, not a comedian!)Look, not to sound dismissive, but D3 is not a thing and likely=20 will never be.=20 Well _I'll_ be dismissive. This idea, even if we were doing the D3 thing, is completely pointless. D !=3D maths. I don't know why I have to point that out, but here we are! :P =20
Oct 03 2012
On Thu, 2012-10-04 at 05:05 +0200, Alex R=C3=B8nne Petersen wrote: [=E2=80=A6]Look, not to sound dismissive, but D3 is not a thing and likely will=20 never be.D v3 will come if it comes. Implying D3 will never happen is, I believe, the wrong sort of impression to put out onto the interwebs; it implies that D v2 is a dead end in the evolutionary stakes. So for the moment D v2 is what there is and is what is being evolved. Subtly different intentions and expectations, more open-ended. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Oct 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
Oct 03 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
Oct 03 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%29I 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.
Oct 03 2012
On Thursday, 4 October 2012 at 05:18:20 UTC, Walter Bright wrote: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.Oh, right. I guess in the following function, S would be a sequence if fun returned always false, as long as a != b. bool fun(S, E : ElementType!S)(E a, E b) { S s1, s2; s1.put(a); s1.put(b); s2.put(b); s2.put(a); return s1 == s2; // S is a sequence, if always returns false // S is a set, if always returns true } So, if S is an associative array, fun can (and most likely will) return true. Good that it's not called a sequence then. It would be confusing if the meaning of the terms matched only 99% of the time.
Oct 03 2012
On 2012-10-04 07:12, Walter Bright wrote: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.Only if it's uses a hash implementation, which it does in D, I assume. -- /Jacob Carlborg
Oct 03 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/
Oct 03 2012
On 10/3/2012 8:04 PM, 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.I kinda thought they should have been called "sources" and "sinks", but I think it's too late for that.
Oct 03 2012
On Wednesday, October 03, 2012 22:13:10 Walter Bright wrote:I kinda thought they should have been called "sources" and "sinks", but I think it's too late for that.Yes, but if we think that it's enough of an improvement, we could probably start naming parameters to range-based functions with names like that. - Jonathan M Davis
Oct 03 2012