3 ms·
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?
by rfgplk 4mo 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?
- lelele 4mo agoSee my reply to a similar objection: https://news.ycombinator.com/item?id=48520416 https://news.ycombinator.com/item?id=48520416
- dwattttt 4mo agoTo 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.