RFC: naming for FrontTransversal and Transversal ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri May 1 18:25:45 PDT 2009


Bill Baxter wrote:
> On Fri, May 1, 2009 at 4:23 PM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> I guess at that point the would-be D user would be entitled to make me a
>> lavaliere out of my Matrix library and move on.
> 
> Python, and therefore NumPy, are reference based.

In a language that's reference based, things can't be helped. They can 
be helped in D though. I wouldn't want to later cringe that I missed the 
opportunity.

> So far I haven't seen any scientists posting on the list about how
> having their arrays and matrices be references is driving them crazy.
> It may be surprising to some of them at first, but even non-hard-core
> coders seem to be able to handle it.

To me this sounds more like an opportunity to do the right thing.

> It helps that dummy assignments
> like a = b are rare.   More often you have things like a = b + c, and
> that creates a new matrix.  Or  a += b, which pretty clearly mutates
> a.

Oh rly. How about this then?

Matrix a, b, c;
...
c = a;
a += b;

Does the last operation mutate c as well?


Andrei



More information about the Digitalmars-d mailing list