|
|
Subscribe / Log in / New account

Leaky Interoperability

Leaky Interoperability

Posted Sep 17, 2025 1:58 UTC (Wed) by hmanning77 (subscriber, #160992)
Parent article: Comparing Rust to Carbon

I'm really curious how Carbon will play out. As mentioned in the talk, C++ already provides the same sort of evolutionary pathway for C code, but in practice I haven't seen that work out. Sometimes people will take the time to wrap the C API in std::unique_ptr's std::vector's, but just as often the use of C types and functions starts leaking out into the C++ code instead. It's fine, in theory, to say that we should just enforce better standards. In practice people have lots to do and little time available. Perhaps Carbon will find ways to discourage temptation to write "just a little C++ to make this work"?


to post comments

Leaky Interoperability

Posted Sep 18, 2025 7:16 UTC (Thu) by taladar (subscriber, #68407) [Link] (2 responses)

Personally I think the "C++ is the successor of C" was only ever marketing and nobody really treated it that way in practice, so in essence it is just failed marketing.

Leaky Interoperability

Posted Sep 18, 2025 14:56 UTC (Thu) by smurf (subscriber, #17840) [Link] (1 responses)

Well, once upon a time there was this thing called "cfront" which transcoded C++ to C …

Leaky Interoperability

Posted Sep 18, 2025 18:38 UTC (Thu) by ejr (subscriber, #51652) [Link]

And then came the battle over template instantiation methods and the ODR...

Leaky Interoperability

Posted Sep 22, 2025 23:19 UTC (Mon) by marcH (subscriber, #57642) [Link]

> It's fine, in theory, to say that we should just enforce better standards. In practice people have lots to do and little time available. Perhaps Carbon will find ways to discourage temptation to write "just a little C++ to make this work"?

Yes, it's all about enforcement. One of the "easiest" ways is to tie bonuses to the "little C++" percentage. You can also block releases until that percentage falls under some target thresholds - exactly like any other quality metric. You can also inflict more mandatory review, test coverage, process overhead and what not on that percentage - making life with the "little C++" miserable.

There are plenty of ways - use your imagination. But they all require a strong, top-down push from management. That push exists in some technical enough companies. That safety push could be enough to make Carbon successful - exactly like it's been making Rust successful.

Who employs the speaker BTW? :-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds