little_ferris@programming.dev to Rust@programming.devEnglish · edit-216 days agoWhat are some mind blowing Rust tricks?message-squaremessage-square52fedilinkarrow-up166arrow-down12file-text
arrow-up164arrow-down1message-squareWhat are some mind blowing Rust tricks?little_ferris@programming.dev to Rust@programming.devEnglish · edit-216 days agomessage-square52fedilinkfile-text
If we were to create a Rust version of this page for Haskell, what cool programming techniques would you add to it?
minus-squareEphera@lemmy.mllinkfedilinkarrow-up2·9 days agoRust has “const generics” which are, for example, used to pass the length of a fixed-length array via the type system. Apparently, const generics also do allow for some mild arithmetic. https://doc.rust-lang.org/reference/items/generics.html#const-generics
Rust has “const generics” which are, for example, used to pass the length of a fixed-length array via the type system. Apparently, const generics also do allow for some mild arithmetic.
https://doc.rust-lang.org/reference/items/generics.html#const-generics