Multidimensional arrays and ranges #28
Replies: 2 comments 21 replies
-
No interest whatsoever? That's disappointing, but consistent with my past proposals. |
Beta Was this translation helpful? Give feedback.
-
@Herringway are you familiar with The ndslice part of Mir was initially added to Phobos |
Beta Was this translation helpful? Give feedback.
-
For a while now, D has supported multidimensional indexing and slicing, but the only way to take advantage of them is for the user to supply their own types implementing them. This is a huge shame, because they make any code thinking N-dimensionally incredibly elegant and easy to maintain!
There are several problems I wish to see addressed:
empty
,front
, andpopFront
only consider single dimensions. Perhaps, in a similar fashion to opDollar, these may be expanded into templates likefront(size_t dim)()
?sort()
to operate on a 2D array, butcycle()
andrepeat(n)
are immediately obvious.Beta Was this translation helpful? Give feedback.
All reactions