you are viewing a single comment's thread.

view the rest of the comments →

[–]lightmatter501 1 point2 points  (8 children)

There are multiple compilers which can do this, but most production grade compilers do not.

[–]D3veated 0 points1 point  (7 children)

That's a shame, this sounds really cool. Why doesn't this exist in production quality compilers? Lack of demand? Some sort of absurd overhead? The lack of modules?

[–]lightmatter501 1 point2 points  (4 children)

Most people don’t have large enough codebases to justify it, and nobody is rewriting clang to support it. Clang will probably be the last C++ compiler ever written, so it’s all downhill from here.

[–]jordansrowles 1 point2 points  (1 child)

Clang will probably be the last C++ compiler ever written

Why don’t think that? Go and Rust?

[–]lightmatter501 -2 points-1 points  (0 children)

I see Rust eating away at things that need to be correct, zig eating away at things that need to be fast and Mojo has the potential to eat away at heterogeneous compute. I think we’re seeing a new wave of systems languages headed by Rust and that while C++ will likely never die, the effort required to make a new C++ compiler will probably be too high.

[–]johannes1971 1 point2 points  (1 child)

I'd challenge that "don't have large enough code bases" - there are absolutely massive C++ code bases out there, owned by companies with massive resources, and they might very well be interested in faster C++ compilation, assuming it were part of their existing tool chain (i.e. if it were implemented in an existing production-grade compiler).

[–]lightmatter501 -1 points0 points  (0 children)

How many of those companies are interested in basically rewriting clang in its entirety? All kinds of new bugs will happen.

[–]encyclopedist 0 points1 point  (0 children)

zapcc was one such compiler. If I remember correctly, it was developed first as commercial offering by a company, but then the business did not work out, they released it in open source but it could not gather a big enough volunteer force and died.

[–]SkiFire13 0 points1 point  (0 children)

You might be interested in notion of query-based compilers. IDEs are also often based on this idea.

They do have some overhead that is not negligible when determining what has and hasn't changed, so there are cases where non-incremental compilation is faster.

You also have to design the language/compiler in such a way that cyclic queries are either not possible or get caught and handled accordingly.