Support ranged integers #195
FedericoCeratto
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Natively support ranged integers can really improve safety/correctness and even readability.
Ranged integers move integer overflow checks and even array indexing errors from runtime to compile time (also leading to performance improvements, FWIW).
Some example discussions about having ranged integers in Rust itself (just to get ideas):
rust-lang/rfcs#671
rust-lang/rfcs#1621
https://internals.rust-lang.org/t/more-on-ranged-integers/8614
https://docs.rs/ranged_integers/latest/ranged_integers/
Beta Was this translation helpful? Give feedback.
All reactions