Home
Thoughts on C/C++ killer
2025-06-21 Sat

How to write C++ replacement

There are several programming languages that are “better C/C++”: zig, odin, jai, D.
The problem is adoption: it’s hard to break from all the code already written in C/C++.
It’s too expensive to rewrite large code bases in new language.
My idea on how to improve adoption: perfect integration into C/C++ ecosystem.
It should be possible to call C/C++ code from new language. That mostly works in those languages, although typically not as easily as it could be.
It should also be possible to integrate the other way: to e.g. add just one .zig file to C code base and be able to call zig functions from C.
This would require some code generation i.e. generating .h files with C declarations for zig code and compiling .zig code to C-compatible object files.
That would allow incremental adoption and incremental porting of C to new language. It would still be difficult and time consuming but at it wouldn’t require cost-prohibitive porting of everything at once.

activity

daily thoughts
Jun 21 2025

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you: