4 ms·
Never trust a programmer who says he knows C++... Never trust someone who says he knows... Never trust a programmer... Never trust C++ ... Never C++... At univ
by gawi 17y ago
Never trust a programmer who says he knows C++...
Never trust someone who says he knows...
Never trust a programmer...
Never trust C++ ...
Never C++...
At university, they taught me C++. I suffered a lot. So the minute I graduated, I stopped doing it. This was a valuable lesson after all.
If someone pretends to understand C++, just look at his code and say "Ok, so what happens if you add 'volatile' just here."
- gridspy 17y agoAnd a good programmer will raise his eyebrow at you and coolly reply "a little less optimisation"
- jmtulloss 17y agoI'm a C programmer, not a C++ one, but at least in C, you sometimes need volatile to have a correct program.
- gridspy 17y agoIndeed. The underling effect of volatile is that the compiler turns off certain optimisations to do with instruction reordering and aggressive caching in registers without stores. However in most places that a typical non-firmware, non-driver programmer would use volatile they really should be using a memory fence (acquire, release or atomic store).