If 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…
Carbon Language: An experimental successor to C++
31–40 of 521 posts
Re: Carbon Language: An experimental successor to C++
#32Earlier quoted context omitted.
> this is a Google led project This doesn't give me much confidence if its Corporate governance rather than open governance.
Nor does it convey any confidence that Google will support it.
Re: Carbon Language: An experimental successor to C++
#33But I don't think a re-sugaring of syntax is enough to make people switch.
Re: Carbon Language: An experimental successor to C++
#34Earlier 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".
Java: ArrayList Zig: ArrayList GLib: GArray Objective-C: NSMutableArray
So List would have been the more Java/Zig way to name it (also Python, etc.)
Re: Carbon Language: An experimental successor to C++
#35> Overall, Carbon is making a compromise around safety in order to give a path for C++ to evolve. C++ developers must be comfortable migrating their codebases, and able to do so in a largely automated manner. In order to achieve automated migration, Carbon cannot require fundamental redesigns of migrated C++ code. While a migration tool could in theory mark all migrated code as unsafe, Carbon should use a safety strategy that degrades gracefully and offers improvements for C++ code, whether migrated or not.
> That does not mean Carbon will never adopt guaranteed safety by default, only that performance and migration of C++ code takes priority, and any design will need to be considered in the context of other goals. It should still be possible to adopt guaranteed safety later, although it will require identifying a migration path.
That's very interesting and pragmatic. It would be interesting if they can eventually come up with the same level of safety guarantees via a different path than Rust's borrow checker.
-------------
Since one of their goals is to automatically translate modern C++ to Carbon, I do wonder how well that is going to work in general.
I definitely welcome an alternative to C++ that would be easier to read and understand. That would be a benefit to the world.
Re: Carbon Language: An experimental successor to C++
#36I seem to be the only one on the planet that doesn't think the language needs to be replaced.
Re: Carbon Language: An experimental successor to C++
#37Earlier quoted context omitted.
Nor does it convey any confidence that Google will support it.
Can we not with this tired joke. Yes we're talking about the company with hundreds of chat apps, but we're also talking about the 100,000+ employee company that developed and support Golang, Dart and Flutter. But ignoring all this, the GitHub page is pretty clear: "Carbon is currently an experimental project." You shouldn't have confidence that it will be supported but they are pretty clear about it, they're trying t…
But yes, I agree, we should have no expectation of support for experimental or beta products.
Re: Carbon Language: An experimental successor to C++
#38If 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…