4 ms·
At this point I don't understand why people don't just use C++ for such a code. Of course bringing all C++ features is another matter. But getting some object-o
by vbezhenar 6y ago
At this point I don't understand why people don't just use C++ for such a code. Of course bringing all C++ features is another matter. But getting some object-oriented C code and transforming it into C++ code is pure win.
- thu2111 6y agoA lot of it is/was driven by the historical instability of the C++ ABI, itself driven by instability in the language. If you made an object with a C based pattern, you could export a binary compatible interface and use dynamic linking. If you exported the same object as C++, even if it boiled down to the same thing, your users might get crashes because two compilers disagreed on the right way to compile it. That's the origin of COM. It's basically the C mything_mystruct pattern with a lot of additional stuff on top. Actual COM objects were usually implemented in C++ though.