Carbon future

I just watched the presentation made by Chandler Carruth at CPP North regarding „the future of C++” - or, more precisely, the introduction of Google’s next programming language to be embraced by the few people who don’t know about how consistent the Google graveyard really is. I’m not sure what is the rationale of this creation, perhaps it’s the one thing that Chandler Carruth need to get a promotion inside Google, or perhpas he got tired of working on real projects and wanted to work on something that he likes without people bugging him all day „why aren’t you fixing X” - where X is the many faults in the gazillion of products that Google prepares to „sunset”.

But that is obviously just speculation. I like Chandler, and I am pretty sure he’s well intentioned. You know, however, what we do with good intentions: we use them to pave the way to hell, and I see this presentation as a short introduction to something that is not particularly well thought. But he starts with an advice: if you have a project that you can do with Rust, go ahead and do it in Rust.

What he presents next is absolutely boring. The rationale he puts for a new language are unconvincing. Sure, technical debt is there, I do agree. Sure, there’s piles of code that one shouldn’t touch, but that pile of code that one shouldn’t touch happens in all the languages - Python for example recently retired half its existing codebase by killing the 2.x branch. There’s literally a ton of python code out there that people shouldn’t touch. So yes, there could be aggressive abandonment for code that does the bad things in a wrong way.

Sure, C++ is part of ISO, and probably this is a good argument in USA because they ride the „we independent y’all!” wave. C++ being a part of ISO means, indeed, that there’s a difficult process to include new features. On the other hand, the ISO inclusion makes sure that you don’t take a 20 ton trailer and crash it in a wall - or, if you do it, that there’s a ton of people watching in disgust the process of slow-crashing a 20 ton trailer into a wall. Being part of the ISO standard process means that there’s more people involved in the decision-making, not just corporate America [citation needed]. But aside that, C++ being part of ISO is indeed not a guarantee of quality, and also it means that there will be hell to pay if people might want to change the language in a significant way, meaning that indeed, C++ needs a revolution. While not agreeing with Chandler’s reasoning, I do agree with the conclusion: ISO slows down C++ evolution.

But Chandler brings the one reason why you don’t want to switch to something like Rust: Rust does not have the environment and wealth of libraries that C++ has. But he strongly suggests that if you can switch to Rust, switch to Rust. As someone who tried to switch to Rust, I can tell you that two years ago the language and the libraries were immature, and it’s the only book where a tutorial written one year before the time I read it was no longer compiling. But we’re not here to bash Rust, we’re here to talk about the successor that Carbon wants to be.

The only rationale for this language is that C++ is hard to parse. Yes. You read it well. C++ is hard to parse. Now, for a version written in bold letters: C++ is hard to parse. Let’s try it now in bold italics: C++ is hard to parse. Ok?

Ok, so what does he do. He comes to suggest a new syntax (fair) and basically concepts thought from the grounds up. And now, for the tentpole, the integration with C++. Which, he explains, you can do by compiling the C++ code, and parsing the AST and…

But Chandler, why can’t you do that with any other language?

Like, seriously. If that can be done, why not do that in Rust? Why not in Go? Why not in C#? Why not in Python, because I’m tired of all the bad C++ integrations in Python? What’s different? The fact that you do it from the start?

Oh, no. And then he goes to explain the process. „Mistakes have been made, but now we have an unproven process where new mistakes can be made with this new awesome language”. This process is awesome because it’s a project lead by himself and two other people! Is this a guarantee of quality? Of… well, of anything, really? Not really. The fact that you use github and pull requests doesn’t make things better.

And let me tell you one thing that I completely hate. Please, no package manager. Not another package manager, please. Because the Linux distro guys will take your package manager and try to deliver components from it themselves, and everything will be an unusable mess again, and we’re tired of this. Like, I’m seriously tired of this, and people who do not understand where the fatal flaws in things such as npm rest.

Chandler Carruth makes this presentation with the naïvete of a software engineer at the beginning of their carreer. „We’ll take our 10 best developers, go in a mountain trip, and rewrite the whole operating system and programming language and make everything incredibly awesome and we’ll never need anything else ever again”. Sure, he might have the Google word behind his back, but the backing of Google is done until Chandler will be promoted, and then we see another language just like Go in an uneasy unmaintained state while everything goes into a suffocating mess.

I guess I’m depressive, and Carbon shows no sign of pulling me out of this depression. I’m looking forward to Carbon’s interoperability with jai, so we can make things as obscure as possible.