r/ProgrammingLanguages • u/matklad • Dec 31 '25
Memory Safety Is ...
https://matklad.github.io/2025/12/30/memory-safety-is.html
37
Upvotes
r/ProgrammingLanguages • u/matklad • Dec 31 '25
View all comments
Show parent comment
1
u/reflexive-polytope Jan 03 '26
My point is that, as a language user, I'm concerned with the correctness of the program I'm actually writing, rather than with weaker properties of every program you could conceivably write.
The mechanisms by which specific language designs enforce type safety or memory safety (or don't) are interesting insofar as they simplify the reasoning by which I can establish that the program I'm writing is correct.
For example, a language that requires the array indexing operation
arr[idx]to be equipped with a (possibly inferred) proof thatidxis a valid index is more useful than a language that inserts a runtime bounds check. As far as I'm concerned, trapping the error at runtime is the same as not trapping at all - the program is equally wrong in both cases.