3 ms·
How about the JS "strict mode" model, that went pretty well? Default C++ is sloppy mode, new code can be strict via opt-in.
by MrBuddyCasino 7y ago
How about the JS "strict mode" model, that went pretty well? Default C++ is sloppy mode, new code can be strict via opt-in.
- Waterluvian 7y agoThis works with supersets and I kind of love it. Like switching to Typescript. My code is just valid immediately. There's no migration downtime. And I chip away and one day it's all done and I disable "allow implicit any". Maybe that's what Python 3 should have done: don't remove stuff, but just make it discouraged and let a python3only" flag treat them as errors when ready. What we got was kind of a mess. Because python2 is very often valid python3... But not always.
- Too 7y agoIn a way that's already available today with -Wall, Wextra -Weverything -Wevenmoreeverything -Wallforrealthistime, clang-tidy, MISRAC and various other static analyzers.
- einpoklum 7y agoNot good enough: 1. "New C++" would not just be a subset of the syntax of old C++. 2. ABI issues.