Re:Object-oriented techniques in C
by kbenson on Tuesday September 22, 2015 @08:37PM
(#10262664)
Yes, so while this technique would be harder to adopt for a library, or at least harder on the users, for an application where you don't really need to worry about people using C calling into your code, it would be fairly useful. A short HOWTO on how to call from C using the necessarily included and emulated C++ vtable bits would make calling in from C possible and easier where required, but you could still reap the benefits of non-C features while sticking with a C toolchain at the lowest level.
[ Parent
| on HN ]
Re:Object-oriented techniques in C
by nostrademons on Tuesday September 22, 2015 @08:59PM
(#10262749)
Usually an 'extern "C" { .... }' declaration is easier if you control the C++ library code.
I see what's being talked about now. I misinterpreted meson2k's original reply, so haven't really been on the same page as you or him.
If current C++ to C transpilers don't handle naming well, that's a problem that should be worked on.