r/cpp • u/[deleted] • Apr 01 '22
Satire Const Correctness Taken Out of C++!
https://shaovoon.github.io/article/const.html69
6
10
2
u/benjamkovi Apr 01 '22
I thought I will read a nice post about const correctness in C++, then I got disappointed :/
0
Apr 01 '22
[deleted]
1
u/benjamkovi Apr 01 '22
No, I am just looking for easy and good guidelines about const correctness, considering member pointers and references, and "thread-safe const members". It is hard topic in my opinion and didn't figure out easy-to-remember rules.
1
Apr 01 '22
Cache efficiency matters more than const correctness, but lacking any elegant way to address that high level languages just trumpet const like a mantra.
6
u/woppo Apr 01 '22
Not that great an April Fool as the originator of the joke does not know enough about programming to realise that there is actually a language called C-- that is extremely well defined and is a target for many language compilers, including Haskell (GHC).
https://en.wikipedia.org/wiki/C--