C vs. C++ for libraries (was Re: SFL and Balsa)



On 2001.10.15 02:34 Brian Stafford wrote:
> I am of the opinion that libraries should be written in C and not C++.
C++
> is a pain to integrate in non C++ programs.  OTOH, it is trivial to wrap
a
> well designed C API for more languages than you could shake a stick at.

Hmmm... Okay, this may be naive of me, but if a library in question exposes
only an API (in other words, only the function calls it wants exposed to
the outside world) and the rest left as as an airtight black box, does it
really matter what the contents of the black box were written in? I'll
admit that most of my background is in higher level languages (Visual
FoxPro, and lately Python), but I do have some C behind me, and find that
the object-oriented model is usually the better model for design, which in
the case of libraries would be C++ (gawds, please - not C#!!!). The
Gtk+/Gnome implementation in C strikes me as a poor imitation of true
object-oriented design, for example (yes, I know that one would usually not
use those calls in a library).

But that's just me...

David M. Stowell
------------------------------------------------------------
Raven (not the OTHER Raven, THAT Raven! :-)
<dmstowell@ameritech.net>

And if love remains
Though everything is lost
We will pay the price
But we will not count the cost



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