← Back to context

Comment by rfgplk

2 days 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.