Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-10 01:03:58


--- "Sreekant Sreedharan" <blue_panther_at_[hidden]> wrote:

First of all I would like to remark that I never meant to say any thing against design patterns implementation in a code.

>1. A general purpose library should appeal to a maximum set of people, not
>necessarily all..
>The keyword is 'not all'. To put it simple, it follows the 80/20 rule. If it
>does, patterns will be used as often as you use an STL vector, list or map.

Unfortunatly your solutions does not fit to this rule. It may appeal to you problems, but I assume it would be poor general solution.

>
>2. A general purpose is simple enough to warrant its usage even by a
>beginner. To put it plainly... 'Simplicity is the essence of art'

Real art is to find a proper ratio between simpleicity (usability, portability,"graspability") and flexibility (cover at least 80 persent from the beggining,easy to extend,...)

>5. Not all implementation can be generalised....
>For example, the multitude of implementation of a singleton pattern, with
>its tradeoffs, make it difficult to be generalised. (It is so simple, its
>tough :)!!!!! ). But half the time, I am desperate for a singleton!!! I had
>to settle for the simplest, rather than complicate it for the user!. (Am
>still not happy with what I invented.. :) ).

I do not agree with that. I still sure that we will be able to find corrent ratio. Your ratio is 99/1.

>
>6. A general purpose library has to be portable!......
>Need I say more? :)

Our expirience shows that we could achive a lot portably.

>
>7. It should strive to ease the task of a programmer.....
>Half the time I am writing a code, I am writing a manager. Today when I
>write code, I often write it as...
>
>class CSesssionManager:patterns::manager<CSession>
>{
> ...
>};
>
> ..without a worry about if it should be multithreaded, or have special
>object behaviour like a COM or CORBA reference counted objects, dada dada
>dada...
> Well, I could have easily implemented it as a vector, or list... but why
>do I have to? when its an established pattern?... and secondly, when I write
>that one line above, I am telling the reader, that this class is a manager
>for sessions.... and she does not have to look at the file header, or the
>documentation.. it is self expressive!!

But! Reader unfamiliar with the pattern (like me) left clueless how you gonna manage it, how could it be configured and why is it better that Container Pattern? And after checking the implementation I would find that you don't really bring to much additionally to the container. Look for example onto the object_pool class I posted recently (which is in your sence manager class). Could it be implemented with you framework?

>
>
> I persent these arguments in support for David's point.... and to quote
>this fine gentleman...
>'I believe there is enough "general" usage out there to warrant including
>common patterns in Boost.'
>
>Sincerely,
>Sreekant
>

Regards,

Gennadiy.

_____________________________________________________________
A free email account your friends will never forget!
Get YOURNAME_at_[hidden] at http://www.emailaccount.com/

_____________________________________________________________
Run a small business? Then you need professional email like you_at_[hidden] from Everyone.net http://www.everyone.net?tag


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk