3 ms·
> on its way to become the standard low-level language It will take a very long time for Rust to get even close to the huge amount of C++ code out there. There
by mbrodersen 4y ago
> on its way to become the standard low-level language
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.
- zozbot234 4y agoCarbon 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.
- lenkite 4y ago> 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
- zozbot234 4y agoAnd 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.
- gulbanana 4y agoLike the standard library - they don't plan to support exceptions.
- rkangel 4y agoOh, 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.
- google234123 4y agoYou will probably have to write more c++ code to handle those exceptions inbetween