|
Boost : |
Subject: Re: [boost] [Review:Contract]
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-09-02 13:49:15
On Sun, Sep 2, 2012 at 2:28 AM, Roland Bock <rbock_at_[hidden]> wrote:
> Hi,
>
> first of all, YES, the library should be included in BOOST, in my opinion.
Thanks for submitting the review.
> In addition:
>
> * What is your evaluation of the design?
> Very cool. Looks like a 1:1 translations from some good algorithm books into code :-)
>
> * What is your evaluation of the implementation?
> I spent some time browsing through the macro code hoping it would help me to solve a problem of my own which looked similar (turned out it wasn't).
What's the problem you are trying to solve? (Maybe post it in a
separate email thread.)
> Never being a fan of too much macro code, I have to say that this is very nicely written!
>
> My only concerns:
> - It seems to me that the implementation is spread over
> more files than necessary. It made following the call stack
> a bit tiresome.
I refactored the files many times... what's there now makes sense to
me, modularity is important given the amount of pp code this lib has.
Do you have any specific suggestion on some files that should be
merged together?
> - I a bit torn between
> a) Steven's comment who would like to see CONTRACT_OLDOF
> being replaced by the would-be keyword in a possible
> future standard
> b) boost macros being clearly visible as such, leaving
> translation to future standard keywords to the user
> of the library, e.g.
> #define foreach BOOST_FOREACH
>
> I tend towards b).
I just replied to Steven's. CONTRACT_OLDOF is a "special" macro so
#define oldof CONTRACT_OLDOF won't work (because you can't guarantee
proper expansion order that way) but I can provide a
CONTRACT_CONFIG_DEFINE_OLDOF_KEYWORD that will #define oldof for you
(even if oldof doesn't follow the Boost macro naming standard).
> * What is your evaluation of the documentation?
> Excellent!
>
> * What is your evaluation of the potential usefulness of the library?
> It is a very good proof of concept and hopefully the basis for continued discussions about including contracts into the C++ language.
>
> Due to a lack of formal contracts in much of day to day programming and the enormous compile time overhead, I don't see the library being used all over the place anytime soon, but I expect it to be used in generic algorithms, helping both developers and library users.
>
> * Did you try to use the library? With what compiler? Did you have any problems?
> Sadly: No. Did not find the time.
>
> * How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
> I spent a few hours with the code, maybe two hours with the documentation and I followed some of the discussions during the review period.
>
> * Are you knowledgeable about the problem domain?
> I would not call myself an expert, but I know enough to say: I'd really like to have Boost.Contract available the next time I write a mission-critical function/class/library!
Thanks.
--Lorenzo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk