DIP80: phobos additions

via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 14 05:52:51 PDT 2015


On Sunday, 14 June 2015 at 12:18:39 UTC, Ilya Yaroshenko wrote:
> std.range has a lot of types + D arrays.
> The power in unified API (structural type system).

Yeah, I agree that templates in C++/D more or less makes those 
type systems structural-like, even though C is using nominal 
typing.

I've also found that although the combinatorial explosion is a 
possibility, most applications I write have a "types.h" file that 
define the subset I want to use for that application. So the 
combinatorial explosion is not such a big deal after all.

But one need to be patient and add lots of static_asserts… since 
the template type system is weak.

> For matrixes this API is very simple: operations like m1[] += 
> m2, transposed, etc.

I think it is a bit more complicated than that. You also need to 
think about alignment, padding, strides, convolutions, identiy 
matrices, invertible matrices, windows on a stream, higher order 
matrices etc…


More information about the Digitalmars-d mailing list