libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Testing suite samples


From: Rodrigo Rodrigues da Silva
Subject: Re: [libredwg] Testing suite samples
Date: Wed, 20 Jan 2010 00:05:30 -0200
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

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

[Prev in Thread] Current Thread [Next in Thread]