2 ms·
> C (or C++) memory model isn’t really well-defined yet To the limited extent this is true, it's about pragmatism. In Java if the situation is that correct Ja
by tialaramex 5y ago
> C (or C++) memory model isn’t really well-defined yet
To the limited extent this is true, it's about pragmatism.
In Java if the situation is that correct Java now has to be 5% slower then a new JRE is shipped that's 5% slower and some people are unhappy but life goes on.
In C++ if the situation is that correct C++ now has to be 5% slower then C++ programmers will mostly demand an "Incorrect-but-faster" setting on their compiler, and they continue to use the faster code.
So, in practice the fine details of the memory model must reflect the practical reality of the physical computers or else they're useless.