|
|
|
|
|
by ktosiek
5134 days ago
|
|
You can use a language with dependent types (types depending on values, so you can have arrays of type "array of 10 ints" etc.) - it adds some type-level work, but makes a lot of mistakes not even compile. But complicated type systems are, unfortunately, rarely used in languages suitable for system programming. I only know about ATS in this group actually :-) |
|
I have some hope for Rust because their type invariants system (I forget what they're calling it) lets you glue some of this information to variables in a compelling way without necessarily having to solve all the theoretical and practical problems that come with full dependent typing.
We'll see, I guess.