I've been experimenting with a little compile-time bounds-checking vector implementation built upon the typenum crate in Rust: https://github.com/jblondin/vector . It's not particularly useful at the moment, but a fun experiment with types
-
-
I hadn't! Looks like a similar approach. For me, the tricky part was trying to implement Index and IndexMut using typenum numbers for bounds-checking at compile-time, which I had to hack typenum a little to get working.
-
I will have a look afterwards! How does it feel to use typenum to get hackish const generics?
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Writing about stuff to learn how it works, mostly in Rust.
Lead Engineer at