Hacker News new | ask | show | jobs
by Rochus 506 days ago
> I am curious about the issues with C++17 (vs say C++11) though.

It's about dependability and bootstrapping. GCC 4.7 was the last version implemented in C, and it supports C++98/03 and a subset of C++11.

> There are some warts here and there that C++17 fixes [..] nothing major

But it's C++17 and thus requires many more bootstrap cycles until we have a compiler. I think a backend which only supports a subset of the features of a C++17 compiler should not depend on C++17, otherwise its usefulness is restricted by the availability of such a compiler.

> I do not get the fetishizing of C. String handling is just atrocious...

C is just a pretty primitive high-level language (with a very strange syntax) a compiler of which exists on almost any system. The next complexity step is C++98 (or the subset supported by cfront), which solves your issues and is even good enough to build something as complex as Qt and KDE.

> There are no plans to support 32 bit x86

Ok, thanks. The support for ARM32 already enables many use cases.

1 comments

I can commiserate. I did some bootstrapping of gcc 10 years ago and it was the most miserable experience ever. You make a change somewhere. Kick off "make" and 20 min later you get some bizarre error in some artifact that is hard to find, generated by a build system that is impossible to trace.

A self-hosting Cwerg will hopefully be much easier to bootstrap because of its size. But until then, why do you need the (continuous) bootstrapping. You can use a cached version of the bootstrapped C++ compiler or cross compile.

I didn't express a requirement for Cwerg, but just tried to explain why I prefer to implement a compiler in C++98 than C++17.