by cyber1 on 5/21/20, 10:55 AM with 197 comments
by SiVal on 5/22/20, 3:17 AM
The reason C++ is the federal tax code of programming languages is that it is the accumulation of decades of ideas that seemed good at the time--some even were--where each better way to program ended up as the lifeblood of some special interest group that can never be removed, only piled on top of.
By subsetting C++, you can customize it into almost anything you want with just a few exceptions. You can't meaningfully simplify it in a backwards compatible way without breaking most subsets.
So these people are saying it should be simplified in a non-BC way, the only real way to do it, that preserves their own favored subset.
That's what most of us call a new programming language. Trying to turn C++ into !C++ guarantees they'll be fighting over this for years. With the resources Google has, I don't understand why they don't just throw off all C++-based constraints and use those years to create exactly what they need. With half the PL PhDs on the planet in their employ, you'd think somebody would be available. (Maybe even enough for multiple, parallel teams req'd to share ideas with each other.) It would take a few years to mature enough to rely on, but they'd be spending those years in the C++ cmte debates anyway. A new language called "non-BC C++" will need new tools, new libs, etc., anyway, and they'll have the current C++ to keep using until their alternative is ready.
Why not just create that simple, easy, customized-for-server apps language from scratch instead of making it by breaking C++?
by brandmeyer on 5/21/20, 11:51 PM
ABI stability? Backwards compatibility? Shipping binary code? The classic Unix compiler&linker model? Those are some of my favorite features of C++ over the competition. Just because GOOG chose to abandon them in their processes doesn't mean the rest of us should be forced to.
by guggle on 5/22/20, 9:45 AM
In lieu of C++ we hear a lot about Rust these days, with focus on performance and reliability. But I suspect the rate of adoption is such because of the productivity aspect (it seems to me the language itself has non-trivial concepts and its fair share of syntax cruft from what I saw): having integrated tooling, dependency management, all being a de facto standard for the language. Same for Go, it's just very easy to start a project, add a library, compile a project... everything is included.
I guess it's probably not a priority for experienced C++ programmers as they are probably used to it, but I'm sure more people could build stuff in C++ without those barriers.
by hsaliak on 5/22/20, 3:20 AM
by kazinator on 5/22/20, 2:46 AM
What are you going to do if you declare that implementations must be little endian? (It seems that's where that particular goal is headed.)
Will this be well-defined behavior?
// Writing a 1 to u64 requires that u32 will read 1,
// because everything is little endian!
union u {
uint32_t u32;
uint64_t u64;
}
Or, if not, what's the point?What's the good in it, other than that: whereas a big endian machine can still have a C++ compiler, that compiler just can't be called conforming any more?
Nothing changes other than classification. Nonportable code depending on little endian continues not to work on that machine, though now that code might be blessed as "strictly conforming".
Someone wanting code to work on that machine will make it work the same way as before, and quite possibly keep their code strictly conforming. Like before, it will be possible to express code without endian dependencies, and that will work on those "broken" implementations that support big endian systems.
What happened to the idea that systems require programming languages, not the other way around?
by CoolGuySteve on 5/22/20, 2:38 AM
> 2.1. Stable language and library ABI
> 2.2. Backwards or forwards compatibility
> 2.3. Legacy compiled libraries without source code or ability to rebuild
For fucks sake, C has been stable for decades but somehow C++ just can't manage?
This is such an obnoxious attitude. At least let us automatically generate a set of C-style functions that take an opaque void* representing a C++ class instance if you can't be bothered to do the work.
by jonstewart on 5/22/20, 1:46 AM
Some points: * There are still tons of 32 bit machines out there—old Windows machines chugging along, usually disconnected (thankfully), and you’d like to be able to use your _current_ codebase to target them.
* If C++ is to focus on performance, it needs much better tooling around UB, be a bit more permissive of old behavior that now triggers UB, with formal semantics, AND it needs to define semi-portable SIMD vector operations. Getting the utmost performance out of modern CPUs entails using vector operations.
* It also makes me sad to say goodbye to big endian.
by wscott on 5/22/20, 9:29 AM
By default, everything is backward compatible, but to use new features you need to declare this compilation unit as being part of C++23 (or 26, 29). Then code that uses the new stuff also ignores the old and can have different rules. But it can still be combined with legacy code and libraries. You know at compile and linking time when crossing boundaries and can do the right thing. This actually combines nicely with modules since we already need a new build infrastructure to take advantage of modules.
by dwrodri on 5/22/20, 12:08 AM
by Animats on 5/22/20, 6:30 AM
by mianos on 5/22/20, 12:56 AM
I am a C++ and Python developer. I did C++ for 20 years then python for 9, then C++14/17 for 3. I really like the new C++ and think it could be made into a better language while still retaining the deterministic performance.
What we don't want is Python 2 to Python 3 situation. That might mean calling it a new language.
by saagarjha on 5/22/20, 12:29 AM
:(
by cozzyd on 5/22/20, 3:05 AM
by twoodfin on 5/22/20, 1:36 AM
I’m curious: Which divisive issues would have had obvious resolutions if there had been broad consensus on the C++ committee to adhere to these goals & priorities?
by 1over137 on 5/22/20, 2:58 AM
by stephc_int13 on 5/22/20, 12:43 AM
But the impression it gives me is that C++ is not fulfilling the expressed requirements, and it is not currently moving in the right direction.
I read it as a quite strong critic of the current state of the language...
by roca on 5/22/20, 2:49 AM
by fwsgonzo on 5/22/20, 12:05 PM
Very preliminary benchmark C++ Vs Rust on RISCV. C++ is just in its own league. Alone.
Having been at CppCon I can attest to the atmosphere of performance first in C++.
by gok on 5/22/20, 3:02 AM
by cyber1 on 5/22/20, 6:43 AM
by jimbob45 on 5/22/20, 7:10 AM
- Stealing C# attribute notation instead of having the ridiculous __stdcall sort of convention
- Making a real fucking keyword for pure virtual functions instead of = 0
- A real keyword for include guards
- Function pointer syntax sugar
I now realize I'm describing D but D went too far. I just want like three nice changes that still allow near unchanged compilation to C++.