Re:Carbon Language: An experimental successor to C++
by zozbot234 on Tuesday July 19, 2022 @10:05PM
(#32160485)
Carbon is not trying to be 100% interoperable with C++. It's trying for some fuzzy notion of "good enough" - that's really not very different from what Rust is trying to do with cxx-rs. Yes there are serious challenges and I've described them here, but they're not impossible to address while staying with Rust.
Re:Carbon Language: An experimental successor to C++
by lenkite on Wednesday July 20, 2022 @02:22AM
(#32162157)
> Carbon is not trying to be 100% interoperable with C++ It's trying for some fuzzy notion of "good enough"
No, it's clearly not a "fuzzy" notion of interop even in the most uncharitable interpretation. Your assertion is mis-information.
"Seamless, bidirectional interoperability with C++, such that a library anywhere in an existing C++ stack can adopt Carbon without porting the rest."
Support mixing Carbon and C++ toolchains
Compatibility with the C++ memory model
Minimize bridge code
Unsurprising mappings between C++ and Carbon types
Allow C++ bridge code in Carbon files
Carbon inheritance from C++ types
Support use of advanced C++ features
Support basic C interoperability
Re:Carbon Language: An experimental successor to C++
by zozbot234 on Wednesday July 20, 2022 @04:24AM
(#32162937)
And that's still not 100%. The Carbon devs are very clear that there will be some C++ code that Carbon is unable to interoperate with.
Re:Carbon Language: An experimental successor to C++
by gulbanana on Wednesday July 20, 2022 @08:46AM
(#32164964)
Like the standard library - they don't plan to support exceptions.
Re:Carbon Language: An experimental successor to C++
by rkangel on Monday July 25, 2022 @11:04AM
(#32225358)
Oh, that's excellent and interesting news - not a fan of exceptions. I'm not sure how that's going to work with interop when libraries rely on exceptions though. Where did you hear about this? I'd love to know more.
Re:Carbon Language: An experimental successor to C++
by google234123 on Friday July 29, 2022 @11:59PM
(#32284167)
You will probably have to write more c++ code to handle those exceptions inbetween
It will take a very long time for Rust to get even close to the huge amount of C++ code out there. There are more than 5 million professional C++ developers employed around the world today. And that number is increasing. Don’t get me wrong: I like Rust and other attempts to move beyond C++. But don’t underestimate how much C++ code has been written the last 30+ years. And new C++ projects are started every single day. There are probably more C++ projects started every day than Rust projects. So anything that makes it possible to move beyond C++ while being 100% interoperable is good news.