News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by vitno on Tuesday July 19, 2022 @10:45AM (#32152261)
It's not immediately obvious from this page and GitHub org, but this is a Google led project. It's led by Chandler and the c++ toolchain team. I have no idea of it's endgoals or how open to non-Google ideas it will be.
Re:Carbon Language: An experimental successor to C++ by brandmeyer on Tuesday July 19, 2022 @11:16AM (#32152717)
> A key example of this is the committee's struggle to converge on a clear set of high-level and long-term goals and priorities aligned with ours [https://wg21.link/p2137].

I was frankly shocked by that goals and priorities document. The non-goals section reads like an open declaration of war against anyone whose use cases for C++ differ from GOOG and NVDA. My interpretation of Carbon is that since GOOG failed to take over the standard in favor of its narrow use cases, that they are building a new language optimized specifically for them.

> I have no idea ... how open to non-Google ideas it will be.

The most-generous attitude to take is that it will be managed similarly to Go. If your use cases and priorities are well-aligned with theirs, then feel free to use it. But while they may listen to third-party feedback, it will be their own use cases and opinions which dominate the language's development.

Re:Carbon Language: An experimental successor to C++ by chandlerc1024 on Tuesday July 19, 2022 @11:47AM (#32153320)
(one of the Carbon leads)

Success for the Carbon Language requires it to successfully be an independent and community driven project. We may not succeed (this really is an experiment), but we're working hard to engage broadly and early in large part because of this being such an important goal and priority for us.

Projects like this have to start somewhere, but can grow and become community endeavors. We are also already seeing strong interest from other companies and organizations in participating in this experiment.

Re:Carbon Language: An experimental successor to C++ by the_duke on Tuesday July 19, 2022 @01:52PM (#32155436)
The README doesn't expand on what is probably the most challenging problem: how do you achieve effortless C++ interop without burdening Carbon with all the odd behaviour and memory safety / UB issues prevalent in C++?

In Rust for example, `unsafe {}` blocks are not just "local unsafety". They can freely operate on all memory, so they are infectious and are essentially a marker for "dangerous code below, be extra careful and audit lots".

But if all code can freely interoperate with C++, how do you improve upon C++, apart from relatively isolated features like a better generics system?

To what extend can a Carbon compiler that is deeply aware of C++ semantics mitigate the pitfalls?

Re:Carbon Language: An experimental successor to C++ by IshKebab on Tuesday July 19, 2022 @05:30PM (#32158248)
C++ has many many issues other than memory safety. For example implicit type conversion, template duck typing, the include system, the very very very complicated name lookup system, a gazillion footguns inherited from C.

You can definitely massively improve upon C++ without touching its actual computation model.

Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @06:23PM (#32158774)
Starting by using a sane set of compiler flags to make code safer by default.
Re:Carbon Language: An experimental successor to C++ by fractalb on Tuesday July 19, 2022 @01:29PM (#32155088)
Tangent. Absolutely loved your CPPCON talks. Thanks.
Re:Carbon Language: An experimental successor to C++ by gpderetta on Tuesday July 19, 2022 @12:23PM (#32154016)
while we have you here, may I ask why is it called Carbon? It is because the symbol for atomic carbon is C ? :)
Re:Carbon Language: An experimental successor to C++ by unethical_ban on Tuesday July 19, 2022 @03:02PM (#32156357)
To make it as hard to search for solutions online as it is for "go".
Re:Carbon Language: An experimental successor to C++ by astrange on Tuesday July 19, 2022 @07:53PM (#32159517)
Shouldn't be a problem if they're both created by a search engine company.
Re:Carbon Language: An experimental successor to C++ by chakkepolja on Tuesday July 19, 2022 @10:42PM (#32160725)
What's a good name?

Power C++ Syntax Plus Edition

C&₹π÷×√

Re:Carbon Language: An experimental successor to C++ by lenkite on Wednesday July 20, 2022 @02:57AM (#32162417)
Will Carbon natively support exceptions or is it solely going the Rust `Result<T, E>` route ?
Re:Carbon Language: An experimental successor to C++ by mattarm on Wednesday July 27, 2022 @08:16PM (#32258867)
This suggest that Carbon itself won't support exceptions: https://github.com/carbon-language/carbon-lang/blob/trunk/do...
Re:Carbon Language: An experimental successor to C++ by throw827474737 on Tuesday July 19, 2022 @11:44AM (#32153248)
> GOOG and NVDA

Why use these stock index abbrevs (or whatever they are) in this context here? GEEZ!

To the topic, it sounds a bit grumpy. If we look at languages and how many evolve... many suffer the phenomenon that they almost all are Turing complete, and try to gain concise (or simple understandable) expressiveness somehow, and then they try to not break compatibility too much to varying degrees - net result: they grow and grow where at one point they feel like too big, too much legacy dragged around (C++), the "one obvious way" lost (Python) when they cater for use case after use case.

Limiting can be good in that regard. So having key goals defined and not to cater to every small new usecase by someone is a valid attempt to not let this happen, so while I dislike Googles power, I wouldn't feel to bad with attempting this by anyone on their fresh language?!

Re:Carbon Language: An experimental successor to C++ by grimfang4 on Tuesday July 19, 2022 @01:13PM (#32154869)
It's an implication that the driving force for the development is money. By the way, jump on the GEEZ train, that stock's gonna go through the roof!
Re:Carbon Language: An experimental successor to C++ by jcranmer on Tuesday July 19, 2022 @11:48AM (#32153334)
Bits are in such short supply these days that it's necessary to save 32 of them. Think of all the things you could be doing with those 32 bits!
Re:Carbon Language: An experimental successor to C++ by ssokolow on Wednesday July 20, 2022 @03:17PM (#32170801)
Must be another one of those supply chain disruptions.
Re:Carbon Language: An experimental successor to C++ by baxuz on Tuesday July 19, 2022 @11:47AM (#32153310)
Oh so that's what they are.
Re:Carbon Language: An experimental successor to C++ by overgard on Tuesday July 19, 2022 @12:27PM (#32154091)
I really don't see that. At the very start they say

> That said, our experience, use cases, and needs are clearly not those of every user. We aren’t pushing to directly build consensus on these points. Rather, this is presented as a vehicle to advertise our needs from C++ as a high-performance systems language.

The point of the non-goals is simply stating things they don't care about, which is pretty reasonable. After all, it's easy to say what you want, but what are you willing to give up for it?

Re:Carbon Language: An experimental successor to C++ by gpderetta on Tuesday July 19, 2022 @12:07PM (#32153738)
I don't necessarily agree with all their design goals, but it is unfortunately true that getting a large coherent change through the C++ committe is an herculean task. The language ends up doing a random walk via small steps through the design space without a coherent long term vision, because nothing else is feasible.

Implementing a coherent vision might lead to a better language even if most stakeholders might disagree with every single change.

Re:Carbon Language: An experimental successor to C++ by compiler-guy on Tuesday July 19, 2022 @12:39PM (#32154310)
There are weird governance issues with the C++ committee too. Acceptance or rejection of a feature can depend on which reps just happen to show up that day.
Re:Carbon Language: An experimental successor to C++ by zozbot234 on Tuesday July 19, 2022 @11:05AM (#32152525)
Sounds a bit like "C++ but we get to change the ABI, and maybe break some old code for the sake of better-enforced safety guidelines".
Re:Carbon Language: An experimental successor to C++ by klodolph on Tuesday July 19, 2022 @03:03PM (#32156373)
C++ also has a very hard-line "you don't pay for what you don't use" philosophy, which sometimes lead to standard library APIs or language semantics which are a bit tortured.

Compare C++ <random> or <chrono> against, say, the equivalent functionality in Rust, Go, Java, C#, etc. C++'s APIs are a bit overcomplicated, or at least they look that way if you don't know the various reasons why the C++ standard defined them that way (reasons which are probably not relevant to your use cases).

Re:Carbon Language: An experimental successor to C++ by lenkite on Wednesday July 20, 2022 @03:00AM (#32162431)
"C++ also has a very hard-line "you don't pay for what you don't use"

This always felt eye-rolling false to me. We can't have a better hashmap since we all need to pay for the std::unordered_map's un-needed features like bucket access. We are certainly paying for what we don't use.

Re:Carbon Language: An experimental successor to C++ by pjmlp on Wednesday July 20, 2022 @04:50AM (#32163092)
"You don't pay for what you don't use" means the compiler doesn't generate worse code than if you had written the same by hand.

Every other adoption of the meaning is misuse of what Bjarne originally meant with it.

Re:Carbon Language: An experimental successor to C++ by bterrier on Wednesday July 20, 2022 @07:18AM (#32164123)
"You don't pay for what you don't use" does not mean "the compiler doesn't generate worse code than if you had written the same by hand".

These 2 things are C++ core principle, but they are 2 different things.

"You don't pay for what you don't use" means that I you do not use a C++ feature, your runtime performance won't be affected by this feature. For example, non virtual functions are not slower because virtual functions exist.

In our case here, if you do not use "std::unordered_map" and decide to implement your own unordered map, then it is as-if "std::unordered_map" never existed. You are not forced to use "std::unordered_map" and you own map won't be slower because it exists.

"the compiler doesn't generate worse code than if you had written the same by hand", or rather "What you do use, you couldn’t hand code any better", means that if you decided to implement a C++ feature by hand in C++ or C, your implementation could only hope to match C++ implementation. For instance calling a virtual function in C++ will never be slower than a similar handwritten late dispatch implementation.

Re:Carbon Language: An experimental successor to C++ by epage on Tuesday July 19, 2022 @10:50AM (#32152334)
> this is a Google led project

This doesn't give me much confidence if its Corporate governance rather than open governance.

Re:Carbon Language: An experimental successor to C++ by foonathan on Tuesday July 19, 2022 @11:26AM (#32152901)
Based on what they've told me the long term governance plan is to establish an independent foundation, with development controlled by three equal lead developers from different companies.

It may have been started by mostly Googlers but they want other companies and individuals to participate

Re:Carbon Language: An experimental successor to C++ by vitno on Tuesday July 19, 2022 @11:35AM (#32153060)
Official governance vs the effective governance is the real crux of this issue. Immediately starting from the lead developers separated by companies already puts a deep corporate interest spin on the project. Choosing to do a lot of the initial work in secret and then disclosing is also a pretty big data point.

I think this is going to be an uphill battle for them and I hope they win it but I'll be skeptical unless if I start seeing radical (for google) transparency basically immediately.

Also worth pointing out that the language is not immediately worthless even if they fail or only partially succeed in this endeavor!!

Re:Carbon Language: An experimental successor to C++ by ovao on Tuesday July 19, 2022 @11:11PM (#32160935)
This is an odd line to take considering the language spec is unfinished and there’s no implementation. Anything less than or earlier than this phase of initial work would be akin to “let’s make a new C++; anyone have ideas?”

Also, for what it’s worth: despite being an ISO-standard language, C++ is still heavily swayed by corporate interests, with most committee members being tied to BigCos. This has the effect of somewhat-necessarily aligning language progress with its most significant users. Without this alignment, the language might be “better” in some respects, but less useful.

Re:Carbon Language: An experimental successor to C++ by vitno on Tuesday July 19, 2022 @10:53AM (#32152377)
The governance of the project is not immediately clear to me, and I have to assume that the Google team is working in good faith. That team cares a lot about C++ and its future. They are obviously aware of this stigma. I also think that Google is pretty bad at open source governance though :/

Disclosure: Former Google engineer who worked sorta adjacent to some of those people.

Re:Carbon Language: An experimental successor to C++ by chandlerc1024 on Tuesday July 19, 2022 @11:51AM (#32153407)
Re:Carbon Language: An experimental successor to C++ by runevault on Tuesday July 19, 2022 @12:23PM (#32154022)
Huh looking at that page and saw Kate Gregory is involved. She's someone who, as a mostly outsider who dabbles in C++ occasionally, seemed incredibly dedicated to seeing C++ thrive and people come to understand the language. Her involvement here seems like a huge positive to me, but maybe that's coming from a place of ignorance.
Re:Carbon Language: An experimental successor to C++ by vitno on Tuesday July 19, 2022 @11:59AM (#32153581)
Hahaha, I really like the "painter" terminology. A+
Re:Carbon Language: An experimental successor to C++ by dleslie on Tuesday July 19, 2022 @10:57AM (#32152420)
Nor does it convey any confidence that Google will support it.
Re:Carbon Language: An experimental successor to C++ by DashAnimal on Tuesday July 19, 2022 @11:08AM (#32152570)
Can we not with this tired joke. Yes we're talking about the company with hundreds of chat apps, but we're also talking about the 100,000+ employee company that developed and support Golang, Dart and Flutter. But ignoring all this, the GitHub page is pretty clear: "Carbon is currently an experimental project." You shouldn't have confidence that it will be supported but they are pretty clear about it, they're trying to find the right fit.
Re:Carbon Language: An experimental successor to C++ by thesuperbigfrog on Tuesday July 19, 2022 @02:21PM (#32155868)
>> Can we not with this tired joke. . . . You shouldn't have confidence that it will be supported . . .

It is not a joke.

It is a reputation that Google has earned through its actions and inactions.

As shown by https://killedbygoogle.com/ and numerous desperate posts for help [1][2][3] on this and other web sites, Google's "must launch a new shiny thing" promotion culture and abysmal customer service have eroded public trust in the long-term viability of anything that Google creates.

[1] https://news.ycombinator.com/item?id=5523992

[2] https://news.ycombinator.com/item?id=13145927

[3] https://news.ycombinator.com/item?id=31837795

Re:Carbon Language: An experimental successor to C++ by TJSomething on Wednesday July 20, 2022 @11:49PM (#32175569)
The only comparable thing to an open source programming language on that list is AngularJS, and I wouldn't say that was killed but superceded by Angular 2 (which is also a lot better).
Re:Carbon Language: An experimental successor to C++ by riku_iki on Friday July 22, 2022 @07:28PM (#32198361)
there was GWT.
Re:Carbon Language: An experimental successor to C++ by skybrian on Sunday July 24, 2022 @03:07AM (#32211091)
Looks like the GWT community just released a new version in June.
Re:Carbon Language: An experimental successor to C++ by dleslie on Tuesday July 19, 2022 @11:10AM (#32152613)
I wasn't joking.

But yes, I agree, we should have no expectation of support for experimental or beta products.

Re:Carbon Language: An experimental successor to C++ by mda on Wednesday July 20, 2022 @04:42AM (#32163043)
Looking at other languages Google developed and continued supporting, this comment is a bit unfair.
Re:Carbon Language: An experimental successor to C++ by rvz on Tuesday July 19, 2022 @11:29AM (#32152947)
So you had no problem with Golang being led by Google for more than 10 years and now this new language is somehow a problem because that one is also led by Google?
Re:Carbon Language: An experimental successor to C++ by epage on Tuesday July 19, 2022 @11:40AM (#32153157)
This is assuming a lot about me when in fact

- I don't use golang - As an outsider, the governance has seemed unhealthy like with how dependency management was dropped out of no where

However, it has been relatively successful. Dart's success has been more mixed. I am also looking more broadly at projects like Bazel.

Re:Carbon Language: An experimental successor to C++ by chakkepolja on Tuesday July 19, 2022 @10:45PM (#32160747)
Go is governed very well for all practical purposes. If you disagree with their opinions on language design (I do, too) that's another thing.
Re:Carbon Language: An experimental successor to C++ by twoodfin on Tuesday July 19, 2022 @09:31PM (#32160226)
The primary goal is clear from the P2137 document: Performance. There are optimizations both in the standard library and the language that the C++ committee will either adopt too slowly for Google’s needs or not at all.
Re:Carbon Language: An experimental successor to C++ by pif on Tuesday July 19, 2022 @11:12AM (#32152653)
No good can result from the interaction between the most complex and powerful programming language and the corporation who created the programming language for dummies.
Re:Carbon Language: An experimental successor to C++ by endtime on Tuesday July 19, 2022 @11:17AM (#32152741)
They also created Dart, which is a joy to write.
Re:Carbon Language: An experimental successor to C++ by chakkepolja on Tuesday July 19, 2022 @10:44PM (#32160741)
A corporation is not a monolith.