Comment by gf000
3 hours ago
> formal proofs are, as Rust provides something very similar to that
Since when? Rust just has an ML-like type system, and seemingly many have met that for the first time with Rust, even though it has decadeS of history, and multiple production languages running it just fine (ocaml, scala, etc).
Formal proofs are way way above an ML type system. Like how do you encode mathematical statements in Rust's type system? What about statements about program semantics, like program A is equivalent to program B <- in formal verification THAt is the type of an expression, and the implementation of it is the proof.
By similar i meant the strong and powerful type system that Rust has, plus its safety guarantees (iterator invalidation is a compiler error etc). That is in the end a proof system: you are proving to the compiler that you really don't mutate the buffer and you can't drop the T in &T, etc.
Of course the Rust language doesn't give you tools to prove that the program is bug-free or such. The proofs only extend to a basic set of properties, but there is a proof system in Rust.
As for other ML languages, they aren't really C/C++ competitors performance wise, Rust is.