W
websnarf
Richard said:(e-mail address removed) said:
And yet there are probably more libraries written in and for C than in or
for any other language.
Yes, but look at these libraries very carefully. *I* have written a
library for strings. CBFalconer has wriiten a library for hash tables.
Then there is this SGLib thing, and even Boost for C++. There are
things like the PCRE library for regexes as well. The GMP
multiprecision library is also a library that has been made available
for C. These sort of represent the general state of the art for C (and
C++).
Now look at a language like Python. There are of course no libraries
for strings, hash tables, or other ridiculously trivial data types or
any of the examples I cited above at all. Those are all encoded
basically as a handful of keystrokes. Python has bindings to Tk,
telnet, ftp, and other things. Not particular installations of Python
-- *ALL* Pythons have these things.
The very *concept* of what is meant by a library in each of these
languages are completely different. C and C++'s best and most useful
libraries are usually 1) trying to bring C and C++ up to the level of
where other languages are already without special libraries or 2) some
extremely specialized library for dealing with a platform specific
feature or device interface (driver.) In the first case, the large
numbers of C libraries are in a sense a *burden* to the C language
(since those features are not standard, or built in) and in the second,
those are not really *C* libraries, but rather specific
platform-specific and even usually compiler specific libraries.
The latest library that I personally have been looking is a library for
performing screen captures of my desktop (called "vnc2swf"). It
basically connects to VNC, and translates its output to a flash player
format. Now the author originally wrote the thing in C (or C++, I
don't remember) and basically gave up on it in favor of using Python.
Now why would he do that? Could it be that maintaining a cross
platform C library (and a seperate bug database for each operating
system, of course) is a bit of a pain in the ass? As hard as it is to
believe, he has written a screen capture utility that ends up being
cross platform, and which is trivial to extend and maintain precisely
because its written in Python.
Things like boost can be seen almost as a last grasp to keep C++
attractive to HLL programmers while languages like Python and Java
actually concern themselves will truly advanced functionality. And C
cannot even keep up with where C++ is.
So this claim that C has more libraries, maybe true, that doesn't
translate to being necessarily a good thing.