by bluGill · 11mo ago · 0 comments
Classes can be wrapped with a bit of effort. You do need to write the constructors and the destructors manually and invoke a pair of new/delete on the C side, but it's just as you would handle a type allocated by a C library itself. You'd use it the same way. You just have the liberty to have the implementation use (mostly) C++.
And it's not like that's a point in favor of C, since C doesn't have vector or unique_ptr either