by gituliar · 3y ago · 0 comments
Actually, I'm curious if somebody is working on a flavor of the modern C++ that abandons backward compatibility ?
The Carbon project feels like a completely new language. What I'd expect instead is something that adopts best features and practices from modern C++, so that an average C++ project would require just minor changes to migrate, in spirit of Python 2 -> 3 migration.
This is just Rust. You can't really deprecate bare pointers in C++ without completely wrecking the language.
(I could be wrong though! I follow the committee more than you may guess, but not as much as to think I know everything about what's going on.)
And all their header files. That's a real Year Zero moment: you've just cut yourself off from the standard library, as well as most of the code you might want to link to. I don't think there's any "simpler" about it.
Carbon is a completely new language, and that's the point. Part of the language design is making compilation a lot faster, for example, as well as features that C++ can't realistically implement, while retaining C++ interop. It's an exciting way forward if they manage to achieve their goals, and it would be a way to gradually migrate C++ projects.
I think the best practice is for people to stick to a subset of safe patterns in mature languages. For C++, that's probably the C++ Core Guidelines:
I reject the notion that C++‘s “maturity” is a substantial advantage given its unsafety.