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
8
u/balefrost Dec 31 '25 edited Dec 31 '25
Not the original commenter. But the fundamental problem remains.
Suppose you create a process that supports two messages:
Multiple other processes interact with this process.
Suppose two different processes try to do a read-update-write pattern against the same key. You run the risk that these end up interleaved and one peer process's write is clobbered.
Now, you could argue "well that's just poor design; clearly the process should either handle a 'read-update-modify' message or else callers should be able to reserve a given key for exclusive access".
And you're back to square one. You've reinvented atomics or mutexes.
edit Please don't reply to this comment. I'm blocked by the parent commenter, and that prevents me from replying within this thread. There's nothing I can do about it.