Jake wrote:
I'm aware, there would just be a big difference in the API if the
library were C++ (classes, objects) instead of C (structs)

Sure, it's easier to deal with an object-oriented API if you are working with an object-oriented language (and it's not impossible to write an object-oriented-ish API in C, remember GTK). Besides the original work (libdwg) being written in C, we've chosen to stick with C since many CAD programs are written in C (BRL-CAD, GRASS), and we had a deeper knowledge of it. If the library were C++, C programs wouldn't be able to use it unless we had written a C binding.

Through my work with GRASS, I've been trying to enhance the function-structured API to avoid direct struct manipulation, but it's still a hard task. Anyway, we ought to write a C++ API in the future, but I'd say the python API should come first since a bunch of emerging CADs and converters are written in python (parts of FreeCAD, pycad, etc).


Reply via email to