Comment by rfgplk
1 day ago
But isn't this a problem with all code? Looking at a Rust function signature how can you be sure that it does what it says it does? Or python?
1 day ago
But isn't this a problem with all code? Looking at a Rust function signature how can you be sure that it does what it says it does? Or python?
To the extent that one doesn't try to suppress compiler warnings & errors / actively break the language, you get what the compiler confirms is true about a function signature.
For Python, it's very little (nothing?). For Rust, you get more than most; lifetimes tell you whether it holds onto a pointer you give it.
See my reply to a similar objection: https://news.ycombinator.com/item?id=48520416