3 ms·
I wouldn't consider a C++ (or C) replacement PLₓ successful until the people working on big compiler toolchains—many of whom are committed alternative programmi
by cxr 3y ago
I wouldn't consider a C++ (or C) replacement PLₓ successful until the people working on big compiler toolchains—many of whom are committed alternative programming language advocates themselves (consider the origins of e.g. Swift and LLVM)—decide that, moving forward, those will be written in PLₓ rather than C++.
(Note that the bar I'm establishing here is not merely to have a self-hosted compiler (see many toy compilers). I'm talking about a hypothetical future milestone where the software world's core infrastructure comprising LLVM/Clang and* GCC is written in the "replacement language", i.e. the compilers for a bunch of other (non-PLₓ) languages—including C and C++—are written in PLₓ as well. The backends, at least.)
* "or"?
- lifthrasiir 3y agoWhile I do hope that future, it is an unreasonably high bar because the main value of LLVM is that you don't have to make everything again to make your own PL implementation. For the same reason contemporary web browsers are unlikely to be fully rewritten in any other language unless they get completely displaced by newer browsers. (At least LLVM has a better chance of being replaced...)
- cxr 3y ago> contemporary web browsers are unlikely to be fully rewritten in any other language Right. > it is an unreasonably high bar It's not an unreasonable standard. We're talking about replacement. If isn't replacing C++ for this use case, then it's not a replacement by definition.
- lifthrasiir 3y agoIt's unreasonable in the sense that LLVM and a few others may survive even after pretty much everything else got replaced. We need to exempt some outliers with a very high sunk cost.
- plorkyeran 3y agoA corollary of this is that a language probably needs to be able to interop with C++ to have any chance of being able to replace C++, so that the LLVMs and web browsers of the world can migrate incrementally. GCC was able to migrate from C to C++ because of this, and a migration from C++ to some other PL would need to work similarly.