DIP80: phobos additions

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 14 02:19:17 PDT 2015


On Sunday, 14 June 2015 at 09:07:19 UTC, Ola Fosheim Grøstad 
wrote:
> On Sunday, 14 June 2015 at 08:14:21 UTC, weaselcat wrote:
>> nobody uses general purpose linear matrix libraries for 
>> games/graphics for a reason,
>
> The reason is that C++ didn't provide anything. As a result 
> each framework provide their own and you get N different 
> libraries that are incompatible.
>
> There is no good reason for making small-matrix libraries 
> incompatible with the rest of eco-system given the templating 
> system you have in D. What you need is a library that supports 
> multiple representations and can do the conversions.
>
> Of course, you'll do better if you also have 
> term-rewriting/AST-macros.

The reason is general purpose matrixes allocated at heap, but 
small graphic matrices are plain structs. `opCast(T)` should be 
enough.


More information about the Digitalmars-d mailing list