Hacker News new | ask | show | jobs
by rnikander 1214 days ago
Modules look like an awesome, game-changing feature, and they were supposed to be a part of C++20. As far as I know I still can't reasonably use them with Clang and CMake. Anyone know what the problem is? Are enough people being paid to work on C++ implementations? Or is it so difficult that despite the resources, people can't implement it in 3 years?
1 comments

CMake is getting there, https://www.kitware.com/import-cmake-c20-modules, and you can easily use them on Visual C++ 2022. All my hobby coding is done with modules nowadays.

The problem with clang is called Apple and Google, as they decided to focus on their own languages (Swift, Objective-C, Carbon, C++17 being good enough), the compiler vendors that profit from clang forks haven't cared that much to contribute to upstream.

Meanwhile VC++ and GCC are quite green on C++20 compliance, and GCC modules are almost there as well.

I wonder if I can use GCC on macOS to build apps for macOS/iOS that can be App Store deployed. Or if I'm stuck with Clang there.

These days I still use macOS and exist in the Apple ecosystem. I wouldn't mind moving to Linux, but unfortunately I need a MacBook to do work where I build iOS apps. I wonder if there is a way around that.

Apple is quite clear what are the official languages for iOS apps and what role C++ plays on that, like MSL and DriverKit. Note how many C++ talks happen at WWDC.

You're pretty much stuck with clang, unless you feel like hacking around the toolchain workflows.

Do some companies fund GCC C++ development? It seems too hairy for only heroic volunteers to get it done, but I don't know.
Red-Hat for example.