3 ms·
You can already define a custom type which will allow you to have a nice syntax for multidimensional arrays: `Matrix<1,2,3>`. It solves your issue of nesting b
by Ar-Curunir 7y ago
You can already define a custom type which will allow you to have a nice syntax for multidimensional arrays: `Matrix<1,2,3>`. It solves your issue of nesting brackets, and you can impl arbitrary indexing for it.
- kazagistar 7y agoUnfortunately, rust does not have numeric types outside the special case baked in arrays, so it cannot do that yet afaik. There is a ticket for it, but it needs work.
- steveklabnik 7y agoYou can sorta do it kinda today: https://crates.io/crates/typenum https://crates.io/crates/typenum But it will be much nicer and better once const generics lands, it's true.
- Ar-Curunir 7y agoYou can do it in nightly already.