Live data from Hacker News

Google Launches Carbon, an Experimental Replacement for C++

thenewstack.io

11–20 of 243 posts

Re: Google Launches Carbon, an Experimental Replacement for C++

#11
> Complains C++ evolution is too slow due to enforced standardizations by committee.

> Introduces yet another non standardized, corporately backed Rust look-alike language.

What's gonna happen when we have 5 of these things crawling around, are they going to be compatible with each other?

Re: Google Launches Carbon, an Experimental Replacement for C++

#14
post #8
post #5

var r : i32; How is this any better than int32_t r; ? all I see is additional, unnecessary keyword to type.

You type about the same number of characters. Now imagine you wanted to declare the value to be immutable.

Its 5 extra characters actually.. because any sensible C++ project has i32 etc defined.

The type omission version isn't very useful, as this type of code is difficult to read later. Generally end up regretting using auto, and end up converting it to the actual type, except with iterators or nasty templates.

Re: Google Launches Carbon, an Experimental Replacement for C++

#16

> Complains C++ evolution is too slow due to enforced standardizations by committee. > Introduces yet another non standardized, corporately backed Rust look-alike language. What's gonna happen when we have 5 of these things crawling around, are they going to be compatible with each other?

We're just gonna add a 6th standard to end all standards.

Re: Google Launches Carbon, an Experimental Replacement for C++

#17
post #8
post #5

var r : i32; How is this any better than int32_t r; ? all I see is additional, unnecessary keyword to type.

You type about the same number of characters. Now imagine you wanted to declare the value to be immutable.

That's only true because they used build-in int type. Why would I prefer to use: var inst : MyClass; over MyClass inst;

Re: Google Launches Carbon, an Experimental Replacement for C++

#18
post #5

var r : i32; How is this any better than int32_t r; ? all I see is additional, unnecessary keyword to type.

    abc * xyz;
Depending on what abc is (variable or type name) it can be either a multiplication or pointer variable declaration. With the new syntax ambiguity is reduced.

This might not be a huge issue for people reading code (because in context it should be pretty obvious), but for compiler it means that type information is required to parse code and compiler stages get mixed together.

Re: Google Launches Carbon, an Experimental Replacement for C++

#19
I'm probably just biased, but to me the problem with modern C++ is its complexity. The mental model of the language, its syntax, and the amount of history / number of interfaces a programmer needs to be familiar with to be productive are all too large. Rust isn't any more complex, but it's not radically simpler either. Carbon doesn't look like it solves this problem. It would seem that creating a language that is expressive, performant, and small while still general purpose is quite a challenge.
Post reply on HN