Such a quaint throwback!
〝volatile: The Multithreaded Programmer's Best Friend〞 — @incomputable
I'd forgotten how wild C++ was before C++11.
Don't do what the article says! An article from another era.
http://www.drdobbs.com/cpp/volatile-the-multithreaded-programmers-b/184403766 …
If we were designing the language from scratch today, no objection at all. OTOH if the request is "remove volatile [and force everyone to replace it with non-portable hacks]" I have a big problem with that.
-
-
yes to eventually forcing everyone to move away from volatile, but that would be a long time from now. no to non-portable hacks -- the volatile replacement would be precisely as portable as the current code, just with explicit loads/stores instead of implicit ones.
-
As formerly pointed, today peek and poke can be implemented in C due to volatile, and final user can have their peek and poke API. Removing volatile equates to obligatory peek and poke APIs + no C implementation.
-
exactly
-
The whole model of MMIO makes no sense without volatile types. Hypothetical peek/poke functions would have no reason to take pointer arguments you couldn't validly dereference anyway. They would take some sort of integer address arguments...
-
And then they don't even look memory-mapped anymore.
-
Indeed. Personally, obligating asm implementation by removing a feature of a language whose main purpose was to replace asm is not right for me.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.