Gabriel Sechan wrote:

Thats one of the reasons I prefer a small standard library. THere's a lot of places where standard libraries are just bad (C strings, Java's IO library, Java's AWT, PHP's SQL libraries, etc).

Your assertions are not universally shared.

C strings are just fine when a string is a "bag of bytes terminated by NUL". They start looking bad once systems get large and powerful enough to drag along character counters and people try to interchange between systems and languages.

Java's IO library encapsulates a stream abstraction quite well. If you don't want that particular abstraction, you need Java NIO.

AWT was a decent answer if your language is supposed to run applets on a wide range of anemic, non-x86 machines inside a web browser.

I'm not saying that these are good technologies, but they clearly solved a problem at the time or they would never have been implemented.

But since they're the "standard" it takes a long time for someone to write better ones. If you introduced a C or C++ library that bad, noone would use it and they'd use a competitor library instead.

Um, good C libraries? Bad libraries removed by competition? BWHAHAHAHAHAHA! Oh, you kill me.

Ever taken a look at the API for libjpeg, libtiff, libvorbis, etc. Talk about wretched libraries.

Or try finding a C library that implements a circular buffer. Okay, now find it's regression suite. The problem is that nobody bothers with fundamental C libraries, *at all*. That's the whole reason that the Gtk folks had to write glib (which is too tied to Gtk, but is often better than nothing).

And people couldn't even use the STL in C++ for *years* because all of the implementations were so crappy.

Competition between implementations is a good thing, the end result is the bad ones dieing and the good ones stealing ideas from each other.

This simply doesn't happen in C.  And rarely so in C++.

This *is* one of the things that Java does *perfectly*. The ability to simply tear out a crappy library by replacing its jar file is a wonderful thing. Add the fact that everybody expects that a Java library has JUnit tests and you get pretty close to library nirvana.

The fact that I can download a jar file which contains a binary Java library from 5 years ago *and it will still work fine* is something I have never had happen *EVER* in any other language.

I think perl is set up pretty well that way- small standard library, and CPAN exists as an easy way to find quality add on libraries. Or C++, with Boost.

CPAN. <snicker> Which version of the module is compatible with which version of Perl?

I do like Boost. A lot. Once the STL finally became stable, Boost became a shining example of what a library repository is supposed to be.

-a


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to