Live data from Hacker News

Carbon Language: An experimental successor to C++

github.com

101–110 of 521 posts

Re: Carbon Language: An experimental successor to C++

#101

All these C++ "successors" that do nothing but change the syntax sugar and find ways to operate with C++ are really tiring to read about. I seem to be the only one on the planet that doesn't think the language needs to be replaced.

I feel the same way. Add to that the plethora of "C++ bad" memes that every software engineer is throwing around as soon as they get a whiff of anything remotely resembling C++ - I've made my peace with the fact that I'm in a tiny minority of people who think it's generally a great language that is worthy of further development and improvement instead of abandonment.

Re: Carbon Language: An experimental successor to C++

#103
Its github repo has a very interesting doc on when it's the right time for Carbon language to go public. https://github.com/carbon-language/carbon-lang/commit/b8750e...

> Broader field experience required

> Sustained interest to use Carbon from multiple organizations and individuals

> Prototype implementation

> Demonstration of potential

> Learning material

> Prepare for new contributions and feedback

> Launch event

> Relationship to C++

> Perception of ownership by a single organization

Is this post considered as a step towards going public?

Re: Carbon Language: An experimental successor to C++

#104
post #9

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.

> 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 t…

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++

#105

Why use Rust syntax (fn, x:Type, ...)? Syntax is one thing that is not so well-designed in Rust (in my opinion). Also, with the stated goals, it seems a bit unnecessary to overhaul C++ syntax, but then I found no explanation why syntax was changed. So what's wrong with C++ syntax if your goal is a successor of C++? This now looks to me like a Rust-- instead of a C++++, which is a picture they might not want to give r…

It's not just Rust syntax. `name: Type` is the syntax used in TypeScript and Python type annotations (also Ocaml, which is probably where Rust got it from). Golang drops the colon, but still keeps the name first. As for what's wrong with `Type name(constructor, args)`? A lot of tooling wants to be able to parse "mostly-valid C++", like IDEs and compiler diagnostics. Sure, once clang's type inference is finished, the…

And to add, the `name: Type` syntax is not just a modern fad, don't forget the OG language that did this: Pascal! (https://en.wikipedia.org/wiki/Pascal_(programming_language))

Re: Carbon Language: An experimental successor to C++

#106
post #73

why camel-case functions tho :(

Indeed, from Python to Rust and newer C++ codebases you usually see CamelCaseClasses (or structs) and then snake_case for functions methods etc, which improves readability.

CamelCaseForEverything is such a waste, maybe they use it for implicit public/private as in Go? And maybe to please existing Go or Java users?

Re: Carbon Language: An experimental successor to C++

#107
post #70

Earlier quoted context omitted.

D is closer to this than this rust rip-off

Like every braces language following C is a C rip-off? Rusty syntax is objectively superior to almost everything else we've come up with, there's no reason it shouldn't be copied.

> is objectively superior

Those objective criteria of superiority being?..

Re: Carbon Language: An experimental successor to C++

#109
(Speaking only for myself, I just watch from the sidelines and have no involvement)

This seems like Google’s response to

1. Rust not being sufficiently “Go-like” (in the sense of the “The key point here is our programmers are Googlers, they're not researchers” quote) where C++ lets a bunch of people who are not really experts in the language write footguns that Google has to deal with when they cause problems at scale. They want a dumbed-down language (some would use words like approachable/safer/whatever here) for them so nobody will send in CLs with ”clever” code that causes headaches later. I guess they’ll need to have generics but I’m guessing that choices will be made to avoid introducing advanced type theory, functional programming, etc into the language.

2. Google uses C++ differently than everyone else who uses C++. In particular, they have a lot of statically linked code from a monorepo that gets recompiled all the time. This has caused them to put up proposals to “fix” the language that nobody else will support and don’t get adopted, because they break the ABI or backwards compatibility in ways that are unacceptable to the others who participate. It seems like this language is the result of that frustration and subsequent soft-withdrawal from the C++ WG.

I haven’t looked at the design much yet beyond just the simple examples and I think it mostly looks reasonable, but I feel like Google designed this to solve their problems with C++ and is just throwing it out there if people are willing to adopt it because it’s there and Google says it’s good, just like how Go gained traction. Sometimes Google does make good things :) Some Go developers would say that about Go, I’m sure. But if you’re using this, it seems pretty clear that the needs of this will be driven by Google, and the above two points are probably things you should keep in mind as you watch it evolve.

Re: Carbon Language: An experimental successor to C++

#110
post #70

Earlier quoted context omitted.

D is closer to this than this rust rip-off

Like every braces language following C is a C rip-off? Rusty syntax is objectively superior to almost everything else we've come up with, there's no reason it shouldn't be copied.

If Rusty syntax is objectively superior to almost everything else we've come up with, that almost should make us think before blindly copying it.

So, for those thinking “Rusty syntax is objectively superior to almost everything else we've come up with” (I don’t, if only because I don’t believe the syntax of programming languages can be compared on quality without considering the audience), what syntax do you believe it not objectively superior to?

Post reply on HN