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

Writing extensions for projects that support C extensions but may not support C++ extensions, e.g. many dynamic languages.





You can still write the extension in C++ and expose an extern "C" interface.

That's possible, but then the people building your extension need a C++ toolchain.

The question was "please provide examples where switching to C++ involves jumping through even more hoops", and in my view requiring downstream to use a C++ environment when they're expecting to use a C environment qualifies.


True. For me, C++ itself is the maze of hoops I would rather want to avoid.

Most C compilers are C++ toolchain as well, we are no longer in the 1990's.

Unless of course the project is using such a old compiler.


Problems in this domain arise more because you’re wandering off the beaten path for configuration and tooling than because the systems lack absolute capabilities. If you don’t want to build your extension the way that the extension framework expects you, all sorts of annoyances show up. Maintaining an cross-platform compatible C extension is hard enough already.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: