Small vector and matrix proposed for phobos2 now on github
bearophile
bearophileHUGS at lycos.com
Mon Apr 26 14:00:35 PDT 2010
Robert Jacques:
> Yes, but emulating that behavior is difficult. And array ops are still
> buggy and broken to the degree of not being usable. In theory you
> shouldn't need to define a small vector or matrix in D: fixed size arrays
> are value types, array op support and free functions as member function
> support. In practice, though, we still need it.
You are right, in practice we need it. But practice is not enough, we have to keep in mind what's right too. And the right thing is to improve the built-in array ops :-)
And array ops don't replace everything you can do with a vector lib, you can define dot and cross product, small matrices, matrix operations, sparse arrays, truly rectangular arrays made of a single block of memory, etc.
Bye,
bearophile
More information about the Digitalmars-d-announce
mailing list