Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


> 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


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.


Like the standard library - they don't plan to support exceptions.


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.


You will probably have to write more c++ code to handle those exceptions inbetween




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: