by RcouF1uZ4gsC · 5y ago · 0 comments
From my point of view, for Apple, their use of C++, C++17 is good enough.
Metal uses a C++14 dialect as shading language, IO and DriverKit an embedded friendly subset, for everything else there is Objective-C and Swift.
Google seems to have been put off by losing the ABI vote and changed focus into Abseil instead, and have their own Draconian style guide anyway.
And are increasingly adopting Rust as well.
Intel, ARM, IBM, Sony, Nintendo will have to jump in.
By the way, concepts were mostly implemented by a single guy!
Google has not "backed out".
E.g. look at this topic's discussion thread. The current top comment is about [[clang::musttail]]; the implementor of that attribute works for Google. The current second top comment is about the Rust compilation wins from the switch to the New Pass Manager; the NPM was primarily implemented by (and turned on as the default pass manager upstream) by people who work for Google. Google is actually growing our investment in people contributing to core Clang/LLVM.
Source: I am a manager for C++ toolchains (those that target production, Chrome, ChromeOS) at Google.
Which you pretty much confirmed by giving examples completely unrelated to ISO.
How is that migration to C++20 modules support going?
E.g. for standard concepts in libc++:
std::derived_from (D74292) std::convertible_to (D77961) Arithmetic concepts (D88131) std::move_constructible (D96230) std::copy_constructible (D96232) std::invocable (D96235) std::regular_invocable (D96235) etc.
Google is _big_ and C++ is used for many projects that build with disparate toolchains (even if they are all based on Clang/LLVM); each project can have different needs to adopt parts of C++20 sooner than the others, and different costs for doing so. Moving from Clang modules to C++ standard modules is an effort that, for some of our projects, lives at the nexus of "Are Standard Modules sufficiently done upstream to be able to replace our use of Clang modules?" and "What is the cost of doing that?" and "What is the benefit of making that switch?" For other projects, adopting standard modules is a more straightforward calculus.
This highlights an important difference between GCC and LLVM that many fans of the latter seem to miss: LLVM is first a bunch of compiler components that Apple and Google use for their own needs and a C/C++/etc compiler for you and me second and only as long as it flows naturally from the first. While GCC is a C/C++/etc compiler, that's the end-goal.
The root of the problem is that very few people find it "FUN" to implement C++ compilers on their free time, so these open source projects live from companies for contributions.
GCC existed and thrived long before companies started putting money into it. It would clearly suffer if, e.g., Red-Hat withdrew its support, but not nearly as LLVM would in the same situation.
The culture, history and governance of the two projects are very different and they do matter.
Intel and IBM have recently announced their own proprietary LLVM-based compilers, but they seem more interested in backend work to make their own CPU's look good [1] than spending resources on frontend work. I guess that applies to ARM as well.
Sony and Nintendo are, I guess, mostly satisfied? They just want a decently good compiler and toolchain ecosystem, but for games most performance comes from the GPU anyway, chasing low-single-digit performance increases for CPU code doesn't seems like a super good investment opportunity for a game console company.
I don't have a point with this other that it's surprising (for end-users like me). Also, I'm not sure how GCC compares.
Not favorably. Both projects have massive "backlogs," by naive metrics.
Maintainers for both are in a double bind: people get mad when you close their years-old issues because they can't be reproduced anymore, and people give you grief for not closing issues.