Matrix-type-friendly syntax and more

bearophile bearophileHUGS at lycos.com
Mon Oct 10 04:11:38 PDT 2011


Kenji Hara:

> Posted pull request.
> https://github.com/D-Programming-Language/dmd/pull/443

Things are getting interesting. Thank you.
Such syntax is the building material for a good enough user-defined dense nD array. I presume the memory representation of such arrays (possibly in Phobos) will be tiled, to help CPU caches.


> This patch does not break existing codes (at least dmd test suite and
> phobos building).

Given how important multi-dimensional slicing it, a bit of breakage is acceptable if it allows to make the situation simpler & cleaner. People that will implement a nD array years from now will thank you :-)


> I have not added stride syntax (e.g. a[0..$:2]), but I think that
> adding it is not so difficult.

OK.

Bye,
bearophile


More information about the Digitalmars-d mailing list