cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: is there a need for a better libcurl?

From: Wham Bang <wham_bang_at_yahoo.com>
Date: Wed, 29 Mar 2000 14:39:18 -0800 (PST)

Hi all,

I don't want to start a language flamewar or anything, so I don't
think I want to get very deeply into this...

--- Bjorn Reese <breese_at_mail1.stofanet.dk> wrote:
>
> 1) You limit their choice of language. Many languages support C
> linkage, but (almost) none supports C++ linkage.

So maybe you have an optional extern C wrapper layer around your
C++ library? Certainly not unheard of.

> 2) [...] you have to use the same compiler to build
> the library and to build the application [...]

If it's a different language than C++, see #1. And if it's a C++
application, since we're talking about an open-source project,
I do not feel this to be a restriction. Am I missing something?

> 3) Depending on how the library is implemented, you may impose
> design decisions. [...]

Any library designer, regardless of language, imposes design
restrictions on his users. It is the tradeoff the users have to
make in order to avoid implementing the whole thing themselves.

> To sum it up, building C++ libraries is walking a mine field.
>

The only issue that is, IMHO, serious is that of allowing linkage
for users of other languages. And I feel that a proper (and
pretty easily implemented) solution for *that* is to have an
optional C wrapper around your C++ library. I think it's easier
to properly and cleanly design the library in an OO way and
provide some procedural interface to it, than it is to do it
the other way around.

That being said, if the overwhelming majority of cURL developpers
(and the principal author) prefer to write C, then the choice is
eminently clear. But since I'm pretty new around these parts,
I guess I'm trying to assess whether or not that is the case.

=====
Wham! <wham_bang_at_yahoo.com>

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Received on 2000-03-30