Fixed size multidimensional array at runtime

Roman D. Boiko rb at d-coding.com
Sun Jul 1 03:02:45 PDT 2012


On Sunday, 1 July 2012 at 09:52:22 UTC, Denis Shelomovskij wrote:
> 01.07.2012 13:46, Denis Shelomovskij пишет:
>> So I deliberately disallow rule
>>  "`matrix[x]` means `matrix[x, R[]...]`"
>> and made `byTopDimension` property for such iteration:
>> `matrix.byTopDimension[x].byTopDimension[y].byTopDimension[z]`
>>
>> See:
>> http://deoma-cmd.ru/d/docs/src/my/rarray.html#byTopDimension
>>
>
> And yes, addition of `alias byTopDimension opIndex;` in my 
> `RectangularArray` struct should allow your (inconsistent and 
> error-prone, IMHO) syntax.

Just a remark: I like this approach more than the one I provided. 
Mine is simpler, but this one seems to be more robust and generic.


More information about the Digitalmars-d-learn mailing list