Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cppishellacool
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
cppishellacool
11y ago
Don't get me wrong I respect Rust core team as theorists and think rust is an important research project. But in C++ if you have a const member function F() then F() can only change member variables that use the "mutable" key
2.
▲
by
cppishellacool
11y ago
Did you watch the video? Curious why you think using const functions doesn't prevent data races after watching at 29:00 he says the C++ standard guarantees const member functions are data race free.
3.
▲
by
cppishellacool
11y ago
Do you want C++ compiler to also prevent data races? Then use const functions by default, seriously. http://youtu.be/Y1KOuFYtTF4 (starts at 29:00) C++ template meta programming language is such a powerful and expressive too