News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by mrits on Tuesday July 19, 2022 @11:50AM (#32153377)
Designing a language to interop well with a single language is short sighted in my opinion. I want a clean ffi that I know will be able to iterop with Swift, Typescript, C#, C++, C, python etc... In my current project I'm currently using Rust/protobuff to do all of this and it rarely gets in my way of how I want to do things.
Re:Carbon Language: An experimental successor to C++ by compiler-guy on Tuesday July 19, 2022 @12:35PM (#32154227)
The major usecase for Carbon is to advance Google's internal, multi-billion line, C++ codebase.

As nice as a greenfield language with a clean ffi would be, "extremely close ties to C++" is Carbon's primary benefit.

Re:Carbon Language: An experimental successor to C++ by skavi on Tuesday July 19, 2022 @01:16PM (#32154895)
sorry for nitpicking what is likely intentional exaggeration, but multi billion can’t be anywhere near accurate, right?
Re:Carbon Language: An experimental successor to C++ by compiler-guy on Tuesday July 19, 2022 @01:31PM (#32155115)
There are many billions of lines in Google's monorepo[1], summing well over 80 terrabytes of data. The paper below is from 2016, and the repo has only gotten bigger since then.

Exactly how many of them are C++ is not disclosed, as far as I know. But it is public knowledge that C++ is the biggest of Google's primary languages (C++, Java, Go, Python, Javascript, and so on).

https://research.google/pubs/pub45424/

Re:Carbon Language: An experimental successor to C++ by saagarjha on Tuesday July 19, 2022 @01:30PM (#32155090)
No, Google really has that much code. Some of it is probably machine generated but it's definitely in the billions of lines.
Re:Carbon Language: An experimental successor to C++ by summerlight on Tuesday July 19, 2022 @01:27PM (#32155062)
It's a bit of an exaggeration, but it's close. If you count all Google's C++ code base (google3 + open source) it's fairly close to one billion. If you count regardless of language, I believe it's ~3B.
Re:Carbon Language: An experimental successor to C++ by kllrnohj on Tuesday July 19, 2022 @07:38PM (#32159400)
It's funny you list typescript there given typescript itself is a language designed entirely around interop with a single other language.

Kotlin is another such widely liked language that was designed entirely around interop with a different language.

Re:Carbon Language: An experimental successor to C++ by mrits on Wednesday July 20, 2022 @11:00AM (#32166713)
Kotlin took an entirely different approach, one that I agree with. It can easily interact with dozens of other languages because of it.

Typescript is a superset of javascript and intentionally short sighted to fill a current need.

Re:Carbon Language: An experimental successor to C++ by Kranar on Tuesday July 19, 2022 @12:18PM (#32153933)
Many long living languages are those that are source compatible with a single language. C++, Objective-C, TypeScript come to mind.
Re:Carbon Language: An experimental successor to C++ by saagarjha on Tuesday July 19, 2022 @12:14PM (#32153867)
This language has “zero-cost” with C and C++, “minimal cost” with anything else that is compatible with those ABIs, and “moderate cost” with everything else via protobufs :P
Re:Carbon Language: An experimental successor to C++ by wtetzner on Thursday July 21, 2022 @06:57PM (#32186284)
C++ itself was a language designed to interop well with a single language.