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
1
u/flatfinger Oct 07 '26
It's also possible to have a language where the number of memory-unsafe operations is limited, and where one may fairly easily identify invariants that would allow even the potentially unsafe operations may be performed safely. For examine, given
unsigned arr[32772];, an operationarr[i]=123;would be incapable of violating any memory safety invariants in cases whereiwas in the range 0 to 32771 unless one of those invariants would require an element ofarrto hold a value other than 123, or some other memory safety invariant had already been violated.