|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-27 20:50:41
Maurizio Vitale wrote:
> First let me apologize for the short review. It won't make justice to
> the huge contribution Eric made to the Boost Libraries.
>
> I definitely think Proto should be accepted and included into an
> official Boost release as soon as practical.
Thanks.
> - What is your evaluation of the design?
> Beautiful.
>
> - What is your evaluation of the implementation?
...
> I haven't really worked with the version submitted for review, but one
> of the issue I did have with v2 was that and_ and or_ didn't allow for
> 1 and 0 arguments, which is useful in a variety of folding situations.
> I remember Eric agreeing in the end that this could be indeed useful in
> some cases and the problem could be compilation time. I don't know
> if it has been solved one way or the other:
Not yet. It's on my list. I'll fix it post-review.
> Another issue I remember was related to BOOST_PROTO_MAX_ARITY. It is
> (was?) controlling both the maximum arity of boost expressions _and_
> the arity of templates in grammars. Eric promised to decouple the two
> uses, but in my quick look at the docs I couldn't find out whether
> it has happened or not. I believe this change should really go in.
Refresh my memory ... what do you mean by, "the arity of templates in
grammars"? Are you referring to the number of template parameters that
proto::or_ and proto::and_ accept? If so, then yes, you can control this
separately with BOOST_PROTO_MAX_LOGICAL_ARITY (not documented, darn!).
If you mean the max arity of expressions like
terminal< MyGinormousTemplate<_,_,_,_,_,_,_,_> >
then no, this cannot be controlled independently. Do you want that?
> The last design issue I had was about whether expressions should allow
> to store terminals by value. This might be different with the work on
> integrating fusion, I don't know.
> In my application (fixed-point arithmetic) I had cases where my object
> could have been stored by value and taking the space of an int (or less)
> and I would have liked to be able to do so. I admit mine was probably a
> very special case, where the quality of the assembler code generated was
> of upmost importance (must rival hand-written code).
> I don't remember the details of the conversation with Eric on this, but
> I think his conclusion was that allowing the user to specify the storage
> policy would have made compilation in the typical case slower.
> Still...
There is a way to get what you want today, using a custom generator. If
you want, I can show you how. If it doesn't meet your needs, I'm open to
considering alternatives.
<snip rest>
Thanks for the feedback.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk