Readit News logoReadit News
chandlerc1024 commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
ch33zer · a month ago
Chandler I would love to be involved in Carbon development to shape its development to be usable at my company or alternatively to use it in my own projects. What is the best way to stay involved in Carbon development? Just the discord?
chandlerc1024 · a month ago
chandlerc1024 commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
steveklabnik · a month ago
Make sure you're checking out Hylo. I'm not sure that its ideas are right for Carbon, but if you're looking for a credible alternative to Rust's take on safety, I think it's one of the better ones.
chandlerc1024 · a month ago
We've been watching closely since before the name change. =D Had lots of conversations with several of the folks involved.
chandlerc1024 commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
nxobject · a month ago
If you've seen this before, it's worth looking at the 2025 roadmap – it's long-term work, a full safety story hasn't been quite figured out (TBD end 2025), and 0.1 is TBD end 2026. About the pace of Rust, although without the active forum that Rust had in its early days.

https://docs.carbon-lang.dev/docs/project/roadmap.html

What _is_ interesting is that I get the impression that Carbon is being workshopped with the C++ community, rather than the wider PLT community -- I worry that they won't benefit from the broader perspectives that'll help it avoid well-known warts elsewhere.

chandlerc1024 · a month ago
> What _is_ interesting is that I get the impression that Carbon is being workshopped with the C++ community, rather than the wider PLT community -- I worry that they won't benefit from the broader perspectives that'll help it avoid well-known warts elsewhere.

FWIW, we're working hard whenever looking at an aspect of the language to look at other languages beyond C++ and learn any and everything we can from them. Lots of our design proposals cite Swift, Rust, Go, TypeScript, Python, Kotlin, C#, Java, and even Scala.

chandlerc1024 commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
omoikane · a month ago
> I think this page describes "what" but not "why" of Carbon.

Maybe the page was updated recently, but there is a "why" link near the top:

https://docs.carbon-lang.dev/#why-build-carbon

What I would like to see is more documentation on the "why not" that summarizes why other languages and proposals are not sufficient. For example, Safe C++ proposal[1] appears to satisfy all requirements, but I can't find any reference to it.

[1] https://safecpp.org/draft.html

chandlerc1024 · a month ago
The reason the Safe C++ proposal wasn't mentioned is that it came years later. =] I'll see if it makes sense for us to update that section a bit, this probably isn't the only thing that we should refresh a bit to reflect the last few years of developments.

FWIW, the biggest challenge with Safe C++ is that WG21 rejected[1] that direction. And it was developed without building a governance model or way to evolve outside of WG21, and so doesn't seem to have a credible path forward.

[1]: FWIW, some members of WG21 don't agree with this characterizationp, but both the author's impression and the practical effect was to reject the direction.

chandlerc1024 commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
cb321 · a month ago
Not to disagree, but to amplify - FWIW, most of what you say was also the sales pitch for C++ over ANSI C in the early 90s vs. the "pure Java" mentality that shortly followed in the late 90s (with a megaton of Sun Microsystems marketing to re-write almost everything rather than bridge with JNI). People neglect how practical incrementalism can be.

Also, FWIW, it is very ergonomic for Nim to call C (though the reverse is made complex by GC'd types). { I believe similar can be said for other PLangs you mention, but I am not as sure. } It's barely an inconvenience. Parts of Nim's stdlib still use libc and many PLangs do that for at least system calls. You can also just convert C to Nim with the c2nim program, though usually that requires a lot of hand editing afterwards.

Maybe they should write a C++2carbon translator tool? That would speed things up for them. Maybe they already have and I just haven't heard of it? I mean the article does say "some level of source-to-source translation", but I couldn't find details/caveats poking around for a few minutes.

chandlerc1024 · a month ago
Source-to-source translation is definitely planned. We've even done some early experiments.

But we need to get the language and interop into good shape to be able to thoroughly test and evaluate the migration.

chandlerc1024 commented on Carbon is not a programming language (sort of)   herecomesthemoon.net/2025... · Posted by u/todsacerdoti
thechao · 7 months ago
Hey, Chandler— this article says you're using "c++0x" concepts. Is that Indiana-style concepts?
chandlerc1024 · 7 months ago
It was also called that.

But it isn't that we're directly using this, but that definition checked generics are fairly similar to the ideas in that series of proposals, and that led to the generics in Swift. Also closely related to the generics in Rust, etc.

chandlerc1024 commented on Carbon is not a programming language (sort of)   herecomesthemoon.net/2025... · Posted by u/todsacerdoti
phaedryx · 7 months ago
Why not create a word/name? e.g. Clojure
chandlerc1024 · 7 months ago
We played with some, but none stuck.

A big goal was being short and easily pronounced, including by non-native English speakers, in a recognizable way from reading the text. That made the overwhelming majority of "fun" spellings not work well.

On one hand, I feel like we're just not as good at naming as Rust and Zig. Both of those names are :chefskiss:

On the other hand, Carbon does have a bunch of awesome puns waiting for us... So we've got that going for us. =D

chandlerc1024 commented on Carbon is not a programming language (sort of)   herecomesthemoon.net/2025... · Posted by u/todsacerdoti
comex · 7 months ago
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.

chandlerc1024 · 7 months ago
(Carbon lead for context)

I think you're missing the point of the example in a major way...

Personally, I care about finding ways to support a bunch of these other use cases where we can and in good ways. Especially things like build times, dynamically loaded plugins, and vendored libraries. I think we can and _need_ to find reasonable solutions to those.

The specific example is the only one called out because it's the only one that is fundamentally a non-goal.

The other use cases I think we can find good ways to support, but they may not look like a stable ABI for the entire language. Maybe a designated subset or surface which is designed to have long-term link compatibility in some way, etc. Removing that specific use case is important because it opens up more candidate solutions in the space.

And to be clear, this isn't a straw-person use case. This specific wording and use case was a response to that use case being actively supported by the C++ committee on several occasions.

chandlerc1024 commented on Carbon is not a programming language (sort of)   herecomesthemoon.net/2025... · Posted by u/todsacerdoti
atribecalledqst · 7 months ago
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?

chandlerc1024 · 7 months ago
(Carbon lead here)

We tried other names, but we found collisions with essentially all of them. =/ We ended up picking a "least bad", and actually talked to a couple of folks familiar with the old usage to see if it was a worse collision than we realized. They weren't delighted but generally shrugged. So here we are. =/

It's definitely not perfect, but I think it's much more searchable than "C" or some other choices. Ultimately, I think its at least not bad enough to matter compared to the actual project.

chandlerc1024 commented on Circle C++ with memory safety   circle-lang.org/site/intr... · Posted by u/davikr
tialaramex · a year ago
Chandler has explicitly said that he doesn't see a reason to solve data races.

The borrow checker isn't enough on its own to solve this in Rust, Sean explains (probably deeper in Circle's documentation) that you need to track a new property of types which is infectious, Rust does this with the Send and Sync traits.

chandlerc1024 · a year ago
"Chandler has explicitly said that he doesn't see a reason to solve data races."

Er, the slide title says that solving this is highly desirable, just not a strict requirement for security purposes.

Not sure how that's the same as "doesn't see a reason to solve data races". I see lots of reasons. I just think it is possible to achieve the security goals without it.

FWIW, I'm hopeful we'll end up including this in whatever model we end up with for Safe Carbon. It's just a degree of freedom we also shouldn't ignore when designing it.

u/chandlerc1024

KarmaCake day416November 27, 2012
About
[ my public key: https://keybase.io/chandlerc; my proof: https://keybase.io/chandlerc/sigs/XRL0CM8qjS-OCoOLrFvLGLFHwALPlv6UUDA22iTKtVY ]
View Original