Sign in to follow this  
255

Libraries you love/hate.

Recommended Posts

Like the subject says, I'd like to hear about which libraries, APIs, engines, frameworks, ... people here enjoy or despise and why. Here you can praise the libraries that you think deserve more users or warn others about those that have caused you many head-aches. The libraries I like: libsigc++ - The signal/slot library. The concept of signals and slots IMO tends to simplify OO design. The ability to arbitrarily bind and/or hide arguments and do other kinds of processing have a tendency to make my code more readable and elegant. Often the flexibility of the library has saved me from writing one or more redundant functions or classes where functor logic is needed. boost - The C++ extension everyone loves :) Provides almost everything a cross-platform game developer needs in addition to graphics, sound and network subsystems. My favorite part is definately the smart pointers. Other good points: maturity and many essential things in one package. libcurl - Download/upload via standard internet protocols. A very mature and extremely comfortable (and configurable if need be) library for anyone who ever needs to download or upload something in a program. There are two interfaces to code with: the easy one (init, set options/callbacks, execute) and the "multi" interface, which allows some finer control. The list of supported programming languages and operating systems is extensive and the API is well documented. Many auto-update systems are coded with this. I would wager that the usefulness of this library surprieses most who haven't heard of it. The license is BSD-style. It allows using the library in any program with static or dynamic linking. gtkmm - The C++ wrapper to Gtk+. The packing system of Gtk+ together with libsigc++ for event processing make this the most comfortable GUI API I've ever tried (I haven't tried that many though). I started programming with Delphi, which was supposed to be a RAD tool but, even if I hard-code the widget layout, writing flexible GUIs with gtkmm seems at least as fast. Bad points: the Windows port of GTK is not very stable at the moment. Btw. you may have read this article, which is very outdated. The bindings are in my experience (which is limited to some half a dozen smallish admin programs) quite stable. UNIX file descriptors - Not really a library but I really like the flexibility with which UNIX systems treat file descriptors (which can be pipes, network sockets, devices ...). I especially like how temporary files can be unlinked before use and the inode is reference-counted in the kernel. What is not nice here is the lack of standardisation and subtle differences between unices. Fortunately these are mostly documented in the man-pages. The libraries that have not impressed me: Win32 API - The ancient relic interface to Windows programming. Old, C-style, it takes ages to get things done. Fortunately there are better alternatives available. Since I have never been forced to use a particular library, I don't really have much to add here. Something I've looked for but couldn't find is a multi-platform, free, mature, efficient and simple C/C++ wrapper for UDP sockets. I've only listed C++ libraries here myself but naturally the thread is open to other languages as well. Criticism is of course welcome too.

Share this post


Link to post
Share on other sites
A library that I love
I really love the ANSI C library, I always manage find something new in there. It's a shame that so many C++ programmers seems to ignore so much of it..

A library that I hate
ODBC. I need a reference manual just make a simple query.

Share this post


Link to post
Share on other sites
I'm not a big fan of libraries. Mainly I'm stubborn, but most times I find library documentation to be inadequate [or more accurately, to not come down to my unfortunately limited CS training...]. The STL for example...

One library that I have used, and found easy to pick up and acutally *work* with rather than fight with is libGMP. Perl regular expressions are fantastic. [edit: oh yes, and I like everything I've used in D3DX. Makes tons of painful conversion work go away]

Share this post


Link to post
Share on other sites
My current favourite libraries: SDL, FMOD, zlib because they are just so damn easy to work with and are quite powerful as well

The only libraries I would say I have anything against would are DevIL and wxWindows, I found the DevIL API so cumbersome that I gave up after a few hours and found another image library to use and as for wxWindows, the less said about that the better.

Share this post


Link to post
Share on other sites
Oh, where to begin... first of all, DevIL and Win32, despite people speaking against them, I've had no problem with. Win32 is certainly far preferable to that beast, MFC. OpenGL is nice; DirectX is not. ODBC is interesting, I liked it only because it was unique and a challenge. That said, and for those reasons, it's nasty to work with. Not to mention the thousands of lines of code I ended up with. I did touch Morfit once, but I was young and don't hardly remember it. Haven't really worked with higher level 3D engines, but wasn't excited with any. Not CrystalSpace, not OGRE, not the Nebula Device or NeL. WinSock I really like when it behaves, but that's not always. Various sigslot libraries are all nice. The API for embedding Python is the most beautiful thing I've ever worked with when programming. Many of the Python libraries are really quite beautiful. I believe pyjabber is the one I was working with for instant messaging via Jabber. There must have been more, but these are all from memory.

Share this post


Link to post
Share on other sites
Like: Boost, SDL
Hate: curses - it's firmly stuck in the 1970s design-wise, has an enormous number of namespace clashes with other librarys, and defines nasty macros (it defines "clear" as a macro, FFS!)

Mixed feelings: Allegro

Mark

Share this post


Link to post
Share on other sites
I hate libraries that depend on a gazillion other c++ libraries which in turn depend on another gazillion c libraries, all which must be compiled because if the makefile doesnt work you must have a "broken compiler installation". Usually it is also not very clear which libraries must be installed and it's not like C++ error messages give a very clear answer about what's wrong.

Share this post


Link to post
Share on other sites
Hate: All but the most recent libraries made by microsoft. Could the make their code any damned uglier? Seriously, I'd like to strangle the guys at microsoft who come up with the names and argument lists (some of them require a huge number of arguments) at microsoft.

I love OpenGL with all my body (including my pee pee).

Share this post


Link to post
Share on other sites
Like:
.NET Framework: new standard by which class libraries are judged. It isn't perfect, but it is damn close.

WTL: Good at what it does and doesn't try to do too much.

Loki: Ground-breaking library, eagerly looking forward to the additional material Andrei is working on related to Modern C++ Design. Dislike his choice of macros for typelist syntax (I prefer the cons::Type style) and the use of typelists on Functors.

Spirit: brilliant parsing tool with a fairly steep learning curve.

Boost: has some great ideas and very committed to compatibility. The serialization library looks excellent. However I don't agree with some of the implementation decisions that they make, and Boost libs tend to 'stick' together tightly.

Tolerate:
Win32: definitely a legacy API, however they have some really forward-thinking ideas in it already such as fibers (user-mode threads), exception handling, and the consolidated interface for using synchronization primitives is very nice as well. It is definitely an idiosyncratic API, mind you. MSDN is excellent documentation and usually can point out many of the traps you can fall into.

STL: In some areas it gets it all right (exception/performance guarantees) and in others it just really, really sucks. Witness bind1st requiring const member functions or std::map using std::pair as the iterator (how i->first is more readable than i->key is beyond me). And who can forget std::remove() not actually removing anything on its own?

It is an unnecessarily steep learning curve. Because of these problems, I consider STL data structures too low-level.

Dislike:
iostreams: #include the header and all kinds of cruft relating to locales, facets, money punctuation and other crap gets dragged into your executable even though you probably don't use it due to the way the iostreams are set up. Gee, thanks a bunch for letting me format some money in different ways. Then I can cout it to the user and consider my CS 101 program on its way towards i18n.

The concept is excellent, however.

Qt: Native UI on Win32, my ass. They merely imitate imperfectly. Nonnative UIs irk me like nothing else.

Gtk: horrible looking on Win32 as well. Multiple bugs that end up manifesting themselves as application bugs to the point that the Gaim team wanted to ditch the Gtk port altogether for Win32.

Hate:
MFC: CClassname. End of story. Did I mention the 1990s design they were pretty much bound to because they had to maintain compatibility?

Share this post


Link to post
Share on other sites
bind1st doesn't require const member functions. I'm not sure what the story with remove is.

Libraries I Hate:
bsd sockets
POSIX
The Win32 counterparts, irritating as they are, are a godsend in comparison.

I also hate libraries that hide implementation details rather than provide workable abstractions. As a counter-example, wxWidget exposes the low-level window handles and OpenGL contexts in a portable manor so you can use the library with other components or in a way the authors did not explicitly design in (such as multi-threaded OGL applications).

Libraries I like:
STL
boost
ACE - Comprehensive socket and threading library, highly portable and free
wxWidgets
SDL



Quote:
255
Something I've looked for but couldn't find is a multi-platform, free, mature, efficient and simple C/C++ wrapper for UDP sockets.

ACE isn't exactly simple, but you could statically link or just add the needed .cpp files to your project (you don't need the TAO stuff unless you want to run a real-time CORBRA ORB).

Share this post


Link to post
Share on other sites
I forgot to mention OpenSSL which is an optional dependency and a good complement to libcurl. It contains just about everything needed to do cryptography and is quite simple to use. I've used it in a libcurl-based auto-update system for digital signatures and checksumming.

Share this post


Link to post
Share on other sites
I first tried 3d programming with directx a few years ago. Yet it was complicated and cumbersome so I got bored. OpenGL on the otherhand is so simple that I am amazed you can actually do anything with it. But you can. SDL is great with opengl to allow easily portable 3d apps, and also it makes window message handling easier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this