3 ms·
Uh, this is not the history I recall at all. Why is Hanz Boehm referring to memory model fixes and the JMM in the C++11 spec (Java started tackling this proble
by hinkley 3y ago
Uh, this is not the history I recall at all.
Why is Hanz Boehm referring to memory model fixes and the JMM in the C++11 spec (Java started tackling this problem in 2004, see Goetz) if Java copied C++?
- jcranmer 3y agoC++ extended the Java memory model to include atomics, and everyone else copied the C++ atomics memory model. Basically, it goes: * Original data-race-free model (early 90s) * Java 5 memory model (~2004-5) [first incorporated into the programming language, as I'm aware] * C++0x memory model (finalized 2007-2008, IIRC) [added atomics] * Compilers build their internal intrinsics on top of C++0x, sans consume * Everyone else adopts either the C++ memory model as is, or without consume (Sibling comment notes that Java 9 backports the atomics from C++).