Ian Grant wrote:
The work Mental had been doing assumed C. Also I suspect serious consideration would be given to keeping it in C if that would make it easier to reuse in other apps. But we really haven't talked about it.
I favour C. Does providing a C interface compromise any C++ class wrapper for that interface? Whilst I have heard of many C++ class interfaces wrapping C libraries I have never heard of the converse. Is it totally impossible because of C++ method names?
It would mean that using classes(structs with methods) for things like NRPoint would be out, which would be a big loss in my book - there is a lot of complex code which is remarkably simplified (and made correct) if reimplemented using vector operations.
Is it actually hard to make a C wrapper around a C++ library? I know that Qoca (a C++ library I use) has a C wrapper around its C++ innards. I suspect that it is to some extent just folk law that it is easier to wrap C in C++ than vice versa.
njh