|
Boost : |
From: John Torjo (john.groups_at_[hidden])
Date: 2007-12-23 19:41:06
Hello John Torjo,
I don't know where to send my review of Boost.Factory library -
therefore i send it to you. I hope, that until my next review i know it
better, but today i must answer before the time to review has gone.
> * What is your evaluation of the design?
> * What is your evaluation of the implementation?
>
I like, that the lib has direct support for smart pointer, because this
is a normal technic in C++.
But i often has the problem of a 2 phase initialisation. I don't like
it, but i found it very often in practice. After the constructor for
example i must call an init function. Or sometimes i must do things
which are not possible in a constructor. I would like, if the factory
would support such mechanism.
I would like a third (or better an second template argument, and the
allocator become the third argument), which is a policy class for the
two phase construction. After the new the factory call a static function
in the policy class. Default policy is a class which does nothing. But
here I can write a class, which calls e.g. a init function or other things.
Second I would like a name like factory_ptr or factory_pointer more than
only factory for the class. It shows more whats the problem domain of
the factory, and stands more in parallel to factory_value.
> * What is your evaluation of the documentation?
>
I would like a better motivation. I have discuss the lib with a friend
to understand why I need such a lib. I think, not everybody (I include)
has a deep understanding of modern C++ technics, and therefore a better
motivation with two more detailed examples would help the beginners.
> * What is your evaluation of the potential usefulness of the library?
>
I think, the lib addresses a seldom problem. That's why I need some time
to understand the motivation. Perhaps it is a normal problem if the user
has more knowlegde about all STL and Boost libs.
But I love it, if there is a "standard" way of doing things, because it
makes the code more readable. Therefore I like small libs for not often
problems too. I could solve the problem every time with some small
functions without a lib, but with the lib I don't need this small code,
and my code becomes more readable.
> * Did you try to use the library? With what compiler?
> Did you have any problems?
>
I have make some little examples and compiles them with the Microsoft
Visual Studio 2003 (MSV 7.1) without any problems.
> * How much effort did you put into your evaluation?
> A glance? A quick reading? In-depth study?
> * Are you knowledgeable about the problem domain?
>
I have taken 2 hours to read the documentation, to study the header and
the implemenation and to play with some examples.
> And finally, every review should answer this question:
>
> * Do you think the library should be accepted as a Boost library?
>
Yes. I think the library should accepted to Boost, but with the three
discussed extensions:
- Better name for factory: factory_ptr or factory_pointer.
- Better motivation for beginners in the docu.
- Extension with a third template parameter for e.g. 2 phase construcion.
Greetings
Detlef Wilkening
-- http://John.Torjo.com -- C++ expert ... call me only if you want things done right
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk