top | item 9532498

(no title)

mkpankov | 10 years ago

C++ is impossible to validate formally.

Rust inherently guarantees static memory safety in many situations, on the other hand.

discuss

order

mafribe|10 years ago

     C++ is impossible to validate formally.
This is incorrect. Any language with a well-defined semantics (such as a compiler or interpreter) can be validated formally. It may just be too time-consuming for people to bother. For example the operational semantics of C has been implemented formally, e.g. [1]. The same could be done with C++.

[1] http://fsl.cs.illinois.edu/index.php/An_Executable_Formal_Se...

lambdaelite|10 years ago

Right, which is why a subset of C or C++ (like MISRA) is used for critical applications.

monocasa|10 years ago

My day job is currently writing embedded high availability code to a slightly modified version of the JSF coding standard (which is itself a modified version of MISRA for C++). There's a lot of safety that Rust would give us on top of C++ with the coding standard's rules, and we're waiting for Rust to simply mature a little.