That's not really what I meant. The example is showing the problem, the transition to manual memory management just makes it a bit easier to write a program without memory operations in critical sections.
What I'm talking about is a hypothetical language that makes memory operations in critical sections forbidden and considered a compilation error.
What I'm talking about is a hypothetical language that makes memory operations in critical sections forbidden and considered a compilation error.