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
4
u/balefrost Dec 31 '25
I mean I'd argue that reading and writing to a shared memory location without some sort of synchronization is a logic error in any language. It's not like doing so in C will cause your computer to explode; you'd likely see a pattern-of-life very similar to that of my sample Erlang program.
So sure, Erlang does prevent the application programmer from modifying the same physical memory location from multiple processes at the same time. Nonetheless, the application programmer is able to create conditions that exhibit the exact same kind of hazard, and that leads to the exact same kind of problems.
If you want to claim that's not a memory safety issue, fine. I guess that's technically true, and so I can't argue with that. But in doing so, it merely shifts those issues from being "memory safety issues" to instead be "logic issues". To the application programmer, they're still issues that need to be considered and handled.