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



Can we not get into the language thing, it's counter-productive. (After 
me, that is :)
Whether or not a C++ library can easily be used by a C client depends on 
the datatype that the library exports. It should be fine if it doesn't 
have fancy stuff like classes. In which case, you'd have to wrap the C++ 
data structures in C, which is simply a duplicate of effort.

| wil
|
| http://www.dready.org

On 16 Oct 02:19 Raven wrote:
>   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
>  _______________________________________________
>  balsa-list mailing list
>  balsa-list@gnome.org
>  http://mail.gnome.org/mailman/listinfo/balsa-list
>
//
// william.tan@i-dns.net/research_engineer
// \_________/ \_______/ \_______________/
//     name     company         hat



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