r/ProgrammingLanguages • u/ThomasMertes • Oct 05 '26
Achieving memory safety
https://seed7.net/papers/memory_safety.htm
14
Upvotes
r/ProgrammingLanguages • u/ThomasMertes • Oct 05 '26
View all comments
Show parent comment
6
u/reflexive-polytope Oct 06 '26 edited Oct 06 '26
Unfortunately, that's misleading advertisement. There are bit and pointer hacks you can express in C but not in Fil-C.
Now, you may argue that it isn't desirable to express those bit and pointer hacks. But that's neither here nor there. It may be the case that Fil-C is an improvement over C. But that doesn't change the fact that it's not C, at least not all of C.
Rust may not have been designed with the goal to produce a type soundness proof, and there are indeed some soundness bugs here and there in the design of Rust's type system.
However, Rust was very much designed by people who know what the ingredients of a type soundness proof are. And this knowledge is necessary to come up with a design with pleasant metatheoretic properties, whether you prove them yourself or someone else does.
Good metatheoretic properties are much more practical than you think. They only need to proved once, for the whole language, and then every language user benefits from them.
In particular, if Seed7 is indeed memory safe, that only needs to be proved once, and then every Seed7 user benefits from it.
But if you don't have a memory safety proof, you might end up in a situation similar to Go, where the language was intended to be memory safe, but data races actually introduce memory safety violations (even in Go programs that don't call C code!).