== Quote from so ([email protected])'s article
> But a question comes to mind. For library development (or just everything
> if that matters) is the top down OOP approach ideal/right way?
> It is just an idiom that might have elegant solutions for certain tasks.

Frankly, for a library, I hate it in most cases.  Libraries need to make the
simple use cases sufficiently simple that people aren't tempted to roll their 
own.
 This means minimum boilerplate.  Don't make it a class if it can be a free
function.  Don't make me import/search through zillions of tiny modules when I'm
probably going to want to use most of them at the same time.  Don't make me
instantiate 15 layers of decorators just to read in a file line by line (*cough*
Java *cough).

When it comes to the more complicated use cases, trying to anticipate these is
rather difficult.  It's often not too hard to make complicated things possible 
by
writing an OO wrapper on top of a designed-for-simplicity API.  OTOH, if you 
need
to write a bunch of wrappers to avoid needing lots of boilerplate code in the
common cases, you've by definition failed at making simple things simple.

Reply via email to