Array types

bearophile bearophileHUGS at lycos.com
Thu Aug 26 19:55:22 PDT 2010


Norbert Nemec:

>I have to give a comment... :-)

Thank you. I see you talk about only one of the several types of arrays.


> I still have my doubt that rectangular arrays can be implemented to full 
> power in the library.

I think all the features you list are *additive* changes for D language. So I don't consider them a problem. One of them, regarding opDollar, is even already scheduled for addition (I think). So I am not so much worried.

What worries me are the (little) breaking changes, I have listed some possible ones in a very recent post.


> Ultimately, I think that rectangular arrays are as fundamental of 
> numerical computing as hash-maps and strings for other areas.

But is D very interested in numerical computing? It has some interest in this field (see the care about Floating point matters. FP matters in D are not portable on very different CPUs as in Ada, but they are deep).

You can't add all features in D2, so it needed to prioritize. And seeing how all the changes you suggest are additive ones, I think D2 designers have prioritized the right things :-)

For numerical computing D has to learn from Chapel language, I think. It shows solutions that are general and look natural, they aren't little local single-trick hacks (as the .. range syntax of foreach).


> Moreover, 
> there is a huge number of physicists working with Fortran95 simply 
> because it is about as simple to use as Basic, without classes, let 
> alone templates. The mere thought of having to touch classes or 
> templates would deter many of them to consider D an option.

If some numeric-oriented features will be added to D3, those researchers will use already build abstractions (in the language, std lib or external libs), so they will have only limited need to use templates.

Bye,
bearophile


More information about the Digitalmars-d mailing list