4 ms·
“Modern C++” is a term that’s over a decade old; it was first used to describe improvements brought in C++11. That said from an outsider perspective it seems t
by steveklabnik 4y ago
“Modern C++” is a term that’s over a decade old; it was first used to describe improvements brought in C++11.
That said from an outsider perspective it seems that there’s no clear universal definition. Which is totally fine! It’s just more of a vibes-based term than a strict one.
- andrewstuart 4y agoTrue, it's an old tag but I guess I'm drawing attention to the fact that lately it seems to be a term getting some traction. Perhaps C++ has accumulated enough change to really make it worth a look.
- thesuperbigfrog 4y ago>> Perhaps C++ has accumulated enough change to really make it worth a look. If you have not used C++ since before C++ 11, then yes, there are substantial changes. From C++ 11, 14, 17 and onward there are lots of changes, but it's more incremental.
- Bostonian 4y agoThe same could be said of "Modern Fortran", which could refer to any Fortran standard from 1990 on.
- Rochus 4y ago> it was first used to describe improvements brought in C++11. No, it was first used by Stroustrup himself for C++98/03, see https://www.stroustrup.com/DnE2005.pdf https://www.stroustrup.com/DnE2005.pdf.
- steveklabnik 4y agoAh ha, thank you! I wasn't sure if 03/11 was actually true, so I did some googling, and 11 seemed to be the consensus. I will update that fact in my brain, thanks again.
- Rochus 4y agoPeople often don't realize that C++11 only brought syntactic sugar. Even unique pointers and move semantics can also be done in C++03, as e.g. demonstrated by Boost.Move. So if people insist that "modern C++" started with C++11, they actually claim that it was the syntactic sugar which made C++ "modern".
- steveklabnik 4y agoWasn’t that also the auto_ptr/uniq_ptr transition too? Not that only one change like that means you’re wrong, or course, just testing my recollection since I’m obviously a bit off in my timelines.
- Rochus 4y agounique_ptr is usually the feature people mention if looking for a reason why C++11 is not just C++98/03 plus syntactic sugar, because it requires move semantics which was introduced with C++11; that's why I directly pointed to Boost.Move, which offers move semantics including a unique_ptr version compatible with C++98/03. Only in C++14 (or 17, I don't remember, have to look up) they added a feature for which no C++98/03 implementation is known/possible, but most people are not even aware of it (so that one feature is barely the justification of "modern").
- steveklabnik 4y agoThanks!