News for hackers. Stuff that matters.
Re:Doing First Grade Math in Rust's Type System by ReleaseCandidat on Saturday January 13, 2024 @05:15AM (#38978609)
Before const generics, you needed this kind of "types" to use integer values in generics, for example for fixed-length vectors/matrices/... (and const generics still have limitations).

https://doc.rust-lang.org/reference/items/generics.html#cons...

They came with 1.51: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html

Re:Doing First Grade Math in Rust's Type System by hgomersall on Saturday January 13, 2024 @07:50AM (#38979506)
You still need them for many cases the current const generics implementation doesn't support.