Skip to content Skip to footer
0 items - $0.00 0

Carbon is not a programming language (sort of) by todsacerdoti

Carbon is not a programming language (sort of) by todsacerdoti

Carbon is not a programming language (sort of) by todsacerdoti

13 Comments

  • Post Author
    DashAnimal
    Posted February 8, 2025 at 4:18 pm

    As someone who uses C++ daily, very excited for Carbon. I really align with the goals they have set. Its a shame communities like r/cpp block any discussion of successor languages but I hope once this language starts gaining more momentum and nearing release, it will begin to market itself and get more attention.

  • Post Author
    Mond_
    Posted February 8, 2025 at 5:11 pm

    Oh hey, that's my post.

    HI HACKER NEWS! Excited to see you!!! Ping me if you find typos.

    (Also jeez, writing this took way too long and I spent too much time editing it trying to cram everything from Cpp2, the Google governance issue, member access operators as a case study, some historical bits, etc. into the post.)

    EDIT: One of the most interesting things for me is that (so far) no one complained about the lack of Carbon code examples.

  • Post Author
    atribecalledqst
    Posted February 8, 2025 at 5:13 pm

    Have to say, it bothers me a little bit that they named it Carbon. I associate that term strongly with the old Carbon API from Apple.

    Carbon was officially removed with 10.15 Catalina in 2019 – what's the statute of limitations on reusing a name like this?

  • Post Author
    noelwelsh
    Posted February 8, 2025 at 5:20 pm

    What I've seen of Carbon looks really good. I feel they're trying to do something that is hugely ambitious, and so perhaps unlikely to succeed, but I love the vision.

    As I don't have a massive C++ codebase I have no stake in Carbon's success, but I think language improvements are some of the most significant steps we, as an industry can take (language improvements are basically the only way we can rule out entire classes of bugs) and I want our industry to improve.

  • Post Author
    adrian_b
    Posted February 8, 2025 at 5:23 pm

    I have no idea whether Carbon will be successful, but this is the only right way of evolving a programming language when incompatible changes must be made: by providing tools that guarantee a completely automatic migration of the legacy programs.

    Hopefully Carbon will succeed to achieve this goal.

  • Post Author
    hatwd
    Posted February 8, 2025 at 5:30 pm

    Interesting language – its syntax looks like a mix of Rust and Go, with a few of its own idiosyncrasies to distinguish it from those languages.

    > Carbon is a concentrated experimental effort to develop tooling that will facilitate automated large-scale long-term migrations of existing C++ code to a modern, well-annotated programming language with a modern, transparent process of evolution and governance model.

    This is probably where Go and Rust fail to be C/C++ "successor" languages, as interop between those languages doesn't seem to be as seamless as Carbon aims to be.

    Will keep an eye on its development!

  • Post Author
    rednafi
    Posted February 8, 2025 at 5:35 pm

    I haven’t written C++ since I graduated and hopefully won’t have to, but this looks really good.

    While I love Go, I feel like languages like Go and Rust didn’t become C++ killers because they expected everyone to jump on the bandwagon and abandon all their legacy code. That didn’t happen.

    This approach of keeping the interop intact might just work.

  • Post Author
    steveklabnik
    Posted February 8, 2025 at 8:22 pm

    This is a great post! I'm very intrigued to see how Carbon ends up. I've also enjoyed reading about some of their implementation choices, being more data-driven.

  • Post Author
    habitue
    Posted February 8, 2025 at 8:44 pm

    This immediately suggests what you want is a gradual migration process from one language through several intermediate languages to your target language.

    i.e. instead of a big bang C++ -> Carbon migration, instead you want something like:

    C++ -> C+++ -> Carbon– -> Carbon -> Carbon++ -> Rust

    (Basically fake names for more gradual transitional intermediate languages, assuming Google would like to have everything in Rust eventually.)

    The key idea of "targeting automated migrations" makes this kind of thing feasible

  • Post Author
    rvense
    Posted February 8, 2025 at 8:46 pm

    I know enough C++ to understand that "member access operator" example, but not enough to have ever seen that before, and my first thought is just "big yikes".

    I'm sure there are cases where this will mean you can write more general and flexible library code, but is it really worth the cost? C++ just seems so full of this three-starred nonsense.

  • Post Author
    mhh__
    Posted February 8, 2025 at 8:52 pm

    I highly doubt I'll ever use Carbon but I'm really enjoying their statements of their ideology and choices on various matters in the github repo.

  • Post Author
    comex
    Posted February 8, 2025 at 11:15 pm

    I like the idea of Carbon and I hope to use it in the future. But wow,

    > We consider it a non-goal to support legacy code for which the source code is no longer available

    is such a pejorative way to talk about ABI stability.

    Yes, supporting code you lost the source for is one use case for ABI compatibility. I guess it’s a real need that some people have. But it’s by far the most unsympathetic use case. It reeks of antiquated development practices. Plus, binaries with lost source are inherently a ticking time bomb since you won’t be able to port the code to new platforms or make any fixes.

    But what about all the other use cases for ABI stability?

    What if your vendor has the source code but doesn’t want to give it to you?

    What if you do have the source, but you want to be able to update libraries without rebuilding every executable that depends on them? Especially valuable if you’re building an operating system, Linux or otherwise. (There’s a reason that Swift spent so much effort on ABI compatibility.)

    What if you want to let people build dynamically-loadable plugins? (This one at least gets a brief mention in the Carbon goals document, albeit under the "legacy compiled libraries" section.)

    What if you just want to save build time via pre-built libraries?

    Don't get me wrong, I'm not against Carbon's decision to make ABI stability a non-goal. There are real tradeoffs in making ABI stability work. I'm just saying, if you're going to explain why you don't support it, don't dismiss the use cases for it by picking such a poor exemplar.

  • Post Author
    Remnant44
    Posted February 9, 2025 at 12:35 am

    I thought this was a well written and fair article. My preference would be that C++ is not "forked", but I understand the reasons for the impasse and consequences.

    I found the part about member access operators interesting.

    I've written C++ for 25 years, and although I've used "pointer"-to-member(function/fields) ability many times (indeed, this is how you bind signals to your member slots statically in QT!), I had no idea that it could both be null, and that -1 was used for a 'null' 'pointer' in this instance.

    Good example about how large the language is, with so many weird dark darks. The number of air quotes needed above is pretty illuminating on its own.

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.