3 ms·
> Solving this effectively solves all of those hard problems, at least in a subset of your language where you are able to address it. No, "solving" this by pre
by tomp 3y ago
> Solving this effectively solves all of those hard problems, at least in a subset of your language where you are able to address it.
No, "solving" this by preventing it in the first place just makes programming way too hard.
In practice, using something while other people are using it is perfectly fine in most cases. E.g. most Python programs do that, and most don't have bugs most of the time.
The "use-after-free" problem can far more easily be solved by removing `free` (e.g. by using Garbage Collection).
Most concurrency bugs remain even if you solve all data races (e.g. as Python does, with GIL) simply because the semantics are wrong (e.g. having to update 2 counters which cannot happen simultaneously), or iterating through a list while modifying it (no data races here if done from a single thread!).
- rowanG077 3y agoPython still has data races. Modifying variables is not atomic.