4 ms·
That's effectively what the profiles proposal is: a set of compiler warnings that error if you use anything outside a limited subset of modern C++. I don't thi
by AlotOfReading 3y ago
That's effectively what the profiles proposal is: a set of compiler warnings that error if you use anything outside a limited subset of modern C++.
I don't think it's a very good proposal, personally. For one thing, it effectively amounts to a rewrite of nearly all existing code. For another, the error messages that can be emitted are terrible. Worse, it relies on the compiler to do a lot of heavy lifting that just isn't going to happen in the industries it's needed most for years. It's also opt-in rather than opt-out. Depending on the as-yet(?) unclarified constraints on UB, there may be yet more footguns for those unwise enough to attempt incremental rewrites. Also, because it's C++ there are already a bunch of visual warts like having to continue using gsl::span instead of std::span because of subtly different semantics.
Or you can use a memory safe language and get essentially the same/better guarantees without all the caveats. However, you have to list a different language on future job postings.
- lelanthran 3y ago> That's effectively what the profiles proposal is: a set of compiler warnings that error if you use anything outside a limited subset of modern C++. Subtly different - by "a line in the sand" I meant that anything past this line is New C++ and anything behind the line is Old C++. Your compiler for New C++ wouldn't compile anything that is Old C++, and the Old C++ compiler wouldn't compiler much of New C++. Two different languages that both have Current C++ as an ancestor. > I don't think it's a very good proposal, personally. For one thing, it effectively amounts to a rewrite of nearly all existing code. For making it a set of errors in the Current C++, yes, it's a bad proposal and not what I proposed. Under my proposal, it's not like your Old C++ compiler will suddenly stop existing, or stop being supported, would it? You'll effectively have decades before this is the case. > Or you can use a memory safe language and get essentially the same/better guarantees without all the caveats. However, you have to list a different language on future job postings. Yeah. You list either New C++ or Old C++ (or both, if you can). Like many others, I gave up on C++ a long time ago and stick with C for those projects that I both 1) do solo, AND, 2) need the low-level access and performance.
- pjmlp 3y agoAs Python 2, Java 8 and .NET Framework have proven, that never works out that painlessly, plenty of people are still stuck on those versions to this day, with no end in sight, regardless how much the modern versions get pushed. Regarding C, it isn't also not standing still and WG14 is quite clearly turning it into "C++ without classes" kind of language, look forward to more _Generic improvements and upcoming lambdas in C29.
- lelanthran 3y ago> As Python 2, Java 8 and .NET Framework have proven, that never works out that painlessly, plenty of people are still stuck on those versions to this day, with no end in sight, regardless how much the modern versions get pushed. That's sorta my point: it worked out excellently for those languages. Those with legacy code and unable to change still use legacy and the new language gets the benefit of remaining relevant. The point is not "keep that old shit as relevant for as long as possible", the point is "keep the language relevant", and that means jettisoning all the baggage that C++ has. > Regarding C, it isn't also not standing still and WG14 is quite clearly turning it into "C++ without classes" kind of language, look forward to more _Generic improvements and upcoming lambdas in C29. It's not standing still, but the pace and volume of additions is simply nowhere near to what the C++ committee does. As far as C is concerned, while I feel that they are poor stewards of the language, anyway, the future additions do look helpful.
- pjmlp 3y agoIt did not work out excellently, as there are now big problems regarding interoperability between old code and new frameworks, while at the same time finding people willing to work on those projects.