News for hackers. Stuff that matters.
Re:Zapcc – A faster C++ compiler by userbinator on Saturday November 26, 2016 @01:16PM (#13045068)
Cfront? Old and probably has various license restrictions, but you can get the source for it:

http://www.softwarepreservation.org/projects/c_plus_plus/ind...

I think the reason why there are so many C/C-like compilers, but very few C++ (I personally don't know of any open-source ones besides gcc and clang) is due to the complexity of the language; C is simple enough that a single person can easily write a compiler for one in a short time and have it compile both itself and large quantities of existing standard and not-so-standard code:

https://news.ycombinator.com/item?id=10731002

https://news.ycombinator.com/item?id=11903674

https://news.ycombinator.com/item?id=9125912

In contrast, C++ is at least an order of magnitude more complex, with far more features that need to be working to get to something which could usefully be considered 'C++'. For example, templates are pretty integral to the language and implementing them correctly is not trivial.

The number of people who can write a whole C compiler, while relatively many, is still a tiny fraction of all programmers. (I do wish there were more, since I personally think the concepts aren't so hard once you see the essence of the tiny compilers like tcc or C4.) And a much tinier fraction of them will want to try writing one for even a subset of C++.

There are no comments on this comment yet.