October 04, 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.
October 04, 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' !
October 04, 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ø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
> 

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!)

October 04, 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.
October 04, 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
October 04, 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
October 04, 2012
On Thu, 2012-10-04 at 05:05 +0200, Alex Rønne Petersen wrote: […]
> Look, not to sound dismissive, but D3 is not a thing and likely will 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.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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


1 2
Next ›   Last »