1. The ability to interoperate with a wide variety of code, such as classes/structs and templates, not just free functions.
2. A willingness to expose the idioms of C++ into Carbon code, and the other way around, when necessary to maximize performance of the interoperability layer.
3. The use of wrappers and generic programming, including templates, to minimize or eliminate runtime overhead.
In otherwords, what carbon can do that Rust can't do, is take a C++ class with a `foo` method and call that method. Or create a class with a `foo` method and call that method from C++. Probably one of the biggest hurdles to get over in C++ interopt. Most don't do that, instead you'd make a C function binding and struct and move data/invoke functions through that.Carbon Language: An experimental successor to C++
21–30 of 521 posts
Re: Carbon Language: An experimental successor to C++
#22Earlier quoted context omitted.
It's std::vector that was weirdly named. In plenty of codebases "Vector", particularly gamedev and scientific, will mean the mathematical object with that name. Other languages don't need to replicate this mistake.
True, though in OP's defense I don't know if I've ever seen a language refer to a growing list of entries as an "array".
Re: Carbon Language: An experimental successor to C++
#23Earlier quoted context omitted.
True, though in OP's defense I don't know if I've ever seen a language refer to a growing list of entries as an "array".
Well, the data structure is called a dynamic array
Re: Carbon Language: An experimental successor to C++
#24If you are like me and wondering "What makes carbon different from Rust or Zig? 1. The ability to interoperate with a wide variety of code, such as classes/structs and templates, not just free functions. 2. A willingness to expose the idioms of C++ into Carbon code, and the other way around, when necessary to maximize performance of the interoperability layer. 3. The use of wrappers and generic programming, including…
Re: Carbon Language: An experimental successor to C++
#25Earlier quoted context omitted.
It's std::vector that was weirdly named. In plenty of codebases "Vector", particularly gamedev and scientific, will mean the mathematical object with that name. Other languages don't need to replicate this mistake.
True, though in OP's defense I don't know if I've ever seen a language refer to a growing list of entries as an "array".
Zig: ArrayList
GLib: GArray
Objective-C: NSMutableArray
Re: Carbon Language: An experimental successor to C++
#26Re: Carbon Language: An experimental successor to C++
#27It'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++
#28Earlier quoted context omitted.
Well, the data structure is called a dynamic array
I don't see any reference to it in the GH readme, but I do wonder what they call actual arrays (as in, fixed size allocations of memory that store a contiguously typed value).
Re: Carbon Language: An experimental successor to C++
#29It's a shame a stable ABI is declared as one of the non-goals, C++ is painful enough to integrate with other languages.
Re: Carbon Language: An experimental successor to C++
#30Earlier quoted context omitted.
It's std::vector that was weirdly named. In plenty of codebases "Vector", particularly gamedev and scientific, will mean the mathematical object with that name. Other languages don't need to replicate this mistake.
True, though in OP's defense I don't know if I've ever seen a language refer to a growing list of entries as an "array".