Live data from Hacker News

Google Launches Carbon, an Experimental Replacement for C++

thenewstack.io

111–120 of 243 posts

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

#111

"The keepers of C++ prioritize backward compatibility, in order to continue to support widely-used projects such as Linux" I thought Linux was C only and Linus is actively hostile against cpp for some good reasons.

> I thought Linux was C only

It won't be for long (Rust) https://thenewstack.io/rust-in-the-linux-kernel-by-2023-linu... .

But I don't expect C++ to be added.

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

#112

I'm jumping into this a few hours late, but nobody has actually straight up asked the real question: Why try to compete with Rust while not really being a better Rust? The linked article generally defines a language that is more of the same, while Google is throwing Go under the bus to make it happen. The number of current and former Google employees that transitioned from being Gophers to being Rustaceans that I kno…

> Swift implosion What's wrong with Swift? It's a replacement for Objective-C, that nobody besides macOS/iOS devs used anyway, therefore it's no big deal if nobody uses it outside of macOS/iOS development, as it's not a regression

Very few people are using it at all, outside of calling OSX/iOS APIs. They're using it to weld platform support into a C++ codebase, same way they'd use ObjC for that (instead of writing entire apps in it).

The number of pure-Swift projects I've seen per tempus is far less than pure-ObjC, which I think is the best measurement to comprehend Swift uptake. Nobody wanted an ObjC replacement, Apple misread the room.

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

#113

I'm jumping into this a few hours late, but nobody has actually straight up asked the real question: Why try to compete with Rust while not really being a better Rust? The linked article generally defines a language that is more of the same, while Google is throwing Go under the bus to make it happen. The number of current and former Google employees that transitioned from being Gophers to being Rustaceans that I kno…

[deleted]

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

#114
post #70

Earlier quoted context omitted.

Nim also uses 'var' and 'let' for mutability. I like it as well.

knowing neither of these languages i’d rather it be labeled something more clear as neither one of those screams immutable to me. the immutable variant should use the ‘const’ keyword instead.

To me `var` by definition means mutable and `let` sounds like you're laying out a constant in a proof, so I'd say both are pretty clear.

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

#115

I'm jumping into this a few hours late, but nobody has actually straight up asked the real question: Why try to compete with Rust while not really being a better Rust? The linked article generally defines a language that is more of the same, while Google is throwing Go under the bus to make it happen. The number of current and former Google employees that transitioned from being Gophers to being Rustaceans that I kno…

> Why try to compete with Rust while not really being a better Rust? The linked article explains this: classes defined in C++ can be used in Carbon and vice-versa. It even suggests you stick to Rust if that's not what you need. Edit: Oops, I assumed that the "linked article" was the github page[1] for Carbon, which is a lot more useful. [1] https://github.com/carbon-language/carbon-lang#why-build-car...

I guess the README really does answer my question: "Existing modern languages already provide an excellent developer experience: Go, Swift, Kotlin, Rust, and many more. Developers that can use one of these existing languages should."

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

#116
post #2

It’s clear that the value promise of Carbon is to make it attractive to port existing C++ applications to it. But how this is accomplished, article does not go into detail in this. Is there going to be ABI compatibility with C++? What are the features that make Carbon a better porting target than Rust?

The official webisite ( https://github.com/carbon-language/carbon-lang ) goes into better detail, but the gist is that you can basically #include C++ libraries and use their APIs as-is, without needing to resort to unsafe blocks or having to write more idiomatic wrappers.

Does this mean that Carbon needs to include a whole C++ compiler as a part of Carbon compiler?

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

#117

Earlier quoted context omitted.

> Swift implosion What's wrong with Swift? It's a replacement for Objective-C, that nobody besides macOS/iOS devs used anyway, therefore it's no big deal if nobody uses it outside of macOS/iOS development, as it's not a regression

Very few people are using it at all, outside of calling OSX/iOS APIs. They're using it to weld platform support into a C++ codebase, same way they'd use ObjC for that (instead of writing entire apps in it). The number of pure-Swift projects I've seen per tempus is far less than pure-ObjC, which I think is the best measurement to comprehend Swift uptake. Nobody wanted an ObjC replacement, Apple misread the room.

Do you have statistics? I’m an iOS/macOS dev. Everyone I know is using Swift. I think it would be a bad idea to start a new project in ObjC.
Post reply on HN