3 ms·
Totally agree, but it's a bit outside C. The C execution model is essentially built around the idea of a single-thread computer with a flat memory space, with v
by AlotOfReading 3y ago
Totally agree, but it's a bit outside C. The C execution model is essentially built around the idea of a single-thread computer with a flat memory space, with very minor considerations for exceptions hidden in UB throughout the standard. Most of the difficult and expensive consistency stuff is punted outside the language or to other standards like Cilk and UPC, though recent versions have at least recognized that threads and parallel processors exist.
- jstimpfle 3y agoOther languages aren't much different in this regard (other than often being less well specified), because it's the reasonable thing to do. You want to give threads a lot of independence for performance reasons. But people just love to shit on C.
- AlotOfReading 3y agoYes, many popular languages are even worse. Thankfully most of those languages (C++ excepted) aren't used for systems programming like C is and hopefully we can agree that the safety story with C++ is mixed at best. Those that have some history as real systems languages (e.g. Java) tend to have pretty decent execution semantics. But just to provide a real counterargument, Ada/SPARK meets the bars I set above. Rust is also a significant improvement over C in practical terms, even if there isn't an official standard you can point to in the same way.