|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-05-21 16:13:40
Steven Watanabe wrote:
> AMDG
>
> Eric Niebler <eric <at> boost-consulting.com> writes:
>
>>> If you want to change both, a possibility would when (for if_) and
>>> unless (for not_).
>> Interesting. All, any, when, and unless are not unreasonable. I know you
>> retracted this suggestion in another message, but I want you to bring it
>> up again when proto is under review. Naming is super-important, and I
>> want more feedback on this issue. I'll remind you when the time comes.
>>
>
> Another possibility is to use separate namespaces
> proto::operators::or_
> proto::control::or_
I thought about that, and it's not unreasonable, either. It might cause
less confusion. However, the different or_'s will often be used
together, making qualification a requirement. Compare the following
(assumes using namespace proto;):
struct MyGrammar
: control::or_<
operators::or_<_,_>
, operators::bitor_<_,_>
>
{};
to
struct MyGrammar
: or_<
logical_or<_,_>
, bitwise_or<_,_>
>
{};
IMO, eliminating the operators:: namespace would be better. This isn't
half bad:
struct MyGrammar
: control::or_<
or_<_,_>
, bitor_<_,_>
>
{};
But control::or_ is likely to be more common than or_ (the operator), so
the Huffman coding is lousy. Gah, naming is hard! Opinions? Maurizio?
Joel? Hartmut?
-- 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