Re:Parse, Don't Validate and Type-Driven Design in Rust
by jaggederest on Saturday February 21, 2026 @03:40PM
(#47104501)
If the length is read from outside the program it's an IO operation, not a static variable, but there are generally runtime checks in addition to the type system. Usually you solve this as in the article, with a constructor that checks it - so you'd have something like "Invalid option: length = 5 must be within 0-4" when you tried to create the Fin n from the passed in value
[ Parent
| on HN ]
There are no comments on this comment yet.