Re:Making Rust a Better Fit for Cheri and Other Platforms
by samhw on Thursday April 14, 2022 @08:04AM
(#31025751)
If you were going to do that, it may be easier just to implement `Index`/`IndexMut` over `u8`/`u16`/.. for whatever type (newtype if necessary) you're indexing into. I suppose it's hard to say without context though.
I guess something like this might be useful inside of specialized library code that worked with lots of small vectors.
But in general, Rust heavily favors explicit over implicit in many areas. If you want lots of automatic implicit behavior, something like Scala might be a better choice?