Hacker News new | past | comments | ask | show | jobs | submit login

"apples and oranges are both represented as signed 32 bit integers, the allowable range for apples is 0..5, and you can't mix them"

While I can't say that I completely understand the underlying concepts, I believe that this is the sort of thing that Rust's typestate mechanism is intended to achieve (the way I seem to understand it, it's sort of like design-by-contract, except invariants may be checked at dozens of places per line rather than just at function boundaries). You should look into it if Ada's safety guarantees excite you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: