Adding Unicode operators to D

bearophile bearophileHUGS at lycos.com
Sat Oct 25 13:10:42 PDT 2008


Bill Baxter:
> On the other end there are the Matlab and NumPy-type solutions.  They
> are convenient for tinkering around and displaying some results, but
> these are not good for performance.

I have seen many scientific programs that use numpy, so sometimes it's fast enough. But it forces you to write everything in a vector programming style, that a procedural programmer needs time to learn. Normal C/D/C++ code is more flexible, you can work on single items too in a fast way, while in numpy you can go fast only when you work in bulk, on vectors.

On the other hand numpy offers you some higher level operations on arrays that are currently missing in D, like certain complex slicing operations, that may reduce your code length significantly, increasing code readability (because it looks more like formulas); I can show you some examples if you want. Note that in D there's no built-in rectangular dynamic arrays, that are basic stuff in numpy/matlab.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list