News for hackers. Stuff that matters.
Re:Trying out C++20's modules with Clang and Make by humanrebar on Sunday October 15, 2023 @12:52PM (#37891334)
MSVC seems to have the best funding model of the three major compilers. I estimate that has more to do with adoption velocity than head starts on implementation, especially given how long modules have been in progress.
Re:Trying out C++20's modules with Clang and Make by mgaunard on Sunday October 15, 2023 @01:04PM (#37891446)
As I said, the module system in C++20 is literally the Microsoft model.

Clang had another model that was rejected, and most of the years in committee were actually about finding a compromise between Microsoft's and Clang's approach. In the end, Clang wasn't particularly happy about the end result either.

Re:Trying out C++20's modules with Clang and Make by humanrebar on Sunday October 15, 2023 @01:10PM (#37891508)
If it were literally the MSVC implementation, they would have been done threw years ago.
Re:Trying out C++20's modules with Clang and Make by mgaunard on Sunday October 15, 2023 @01:38PM (#37891715)
They were. Gaby has been making presentations at Cppcon about it since 2015. By 2019 it was mostly about teaching people how to use it.
Re:Trying out C++20's modules with Clang and Make by humanrebar on Sunday October 15, 2023 @02:31PM (#37892120)
I'm positive there has been nontrivial work to support C++ modules going into MSVC, msbuild, VS, MS STL, etc., since 2019. And there is still plenty of work to do, for instance helping build systems know when they need to produce more than one IFC for a given module (right now build systems assume modular C++ code is ODR bug free).
Re:Trying out C++20's modules with Clang and Make by mgaunard on Sunday October 15, 2023 @03:54PM (#37892860)
That sounds like it's mostly integration and tooling.
Re:Trying out C++20's modules with Clang and Make by humanrebar on Sunday October 15, 2023 @04:36PM (#37893186)
Also bug fixes. And there are still major headaches around when names are provided both through textual inclusion and import statements.

But integration and tooling is required for any major amount of adoption. IntelliSense has to work. Existing LSPs have to work.

Re:Trying out C++20's modules with Clang and Make by mgaunard on Monday October 16, 2023 @03:50AM (#37896883)
I personally do not use IDEs, completion or even off-the-shelf build systems. I believe that to be a common situation.
Re:Trying out C++20's modules with Clang and Make by mathstuf on Sunday October 15, 2023 @05:42PM (#37893648)
Clang modules were basically "let's try to automate precompiled headers". It lacks the isolation offered by proper modules. Even if they're not faster, the isolation is something I'm looking forward to.
Re:Trying out C++20's modules with Clang and Make by dagmx on Sunday October 15, 2023 @12:57PM (#37891380)
MSVC is also the least expansive of the three compilers. It has a much smaller set of languages it supports (No C, ObjC etc for example), and a much lower focus on performance [1]

That’s not a criticism necessarily , but just to add that I think they likely have a more agile code base as a result.

[1] https://reddit.com/r/cpp/s/BOj34UtKvu

Re:Trying out C++20's modules with Clang and Make by logicchains on Sunday October 15, 2023 @02:39PM (#37892185)
Plus its stdlib is developed by STL, the most fittingly-named guy to be developing a C++ standard library.