Remix.run Logo
▲ rixed an hour ago

Going on a tangent, but I'm always owndering if "modern C++" sounds rather appealing or off-putting to most people?

▲moltopoco 6 minutes ago | parent | next [-]

Just one data point, because I have to get it off my heart. I loved Modern C++ when it meant C++11, but I've become more negative with each new language standard reaching my workplace.

Using string_view over string by default is probably the #1 cause of memory errors that landed on my desk. I also keep hearing that "int x{0}" is preferable to "int x = 0" which allows for super dangerous implicit conversions, but then the same people rewrite push_back into emplace_back, which is much more lenient w.r.t. type conversions. It is also much easier to litter every function with [[nodiscard]] constexpr nothrow than it is to argue for readability.

My best explanation is that "Modern C++" is making developers biased towards whatever language feature is newer, instead of making good decisions. I wish the community gave up on the moniker.

▲omoikane an hour ago | parent | prev [-]

Maybe they are referring to Effective Modern C++ book by Scott Meyers.

I think "modern" is used to contrast newer C++ standards from C++98.

▲ibobev 44 minutes ago | parent [-]

Or an older book.

"Modern C++ Design: Generic Programming and Design Patterns Applied" by Andrei Alexandrescu

Actually, he coined the term. Then Scott Meyers reused it, and now it is a common adjective used before C++ books, libraries, tooling, and so on.