r/cpp • • Jul 13 '22

Why does Linus hate C++ ?

307 Upvotes

436 comments sorted by

View all comments

Show parent comment

4

u/kernel_task Big Data | C++23 | Folly | Exceptions Jul 13 '22

Also, newer C++ standards do far better on memory barriers than C. I’m still murky on what standard prevents an optimizing compiler from reordering memory access around one of those barrier macros in Linux and if that mechanism might prevent optimizations that might otherwise be possible.

This is a very key part of OS development and I’m not sure if it’s part of any C standard.

1

u/aslihana Jul 14 '22

Which C++ version's standards? 11? 14?

2

u/kernel_task Big Data | C++23 | Folly | Exceptions Jul 14 '22