Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-05-21 16:13:40

Steven Watanabe wrote:
> Eric Niebler <eric <at>> 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::bitor_<_,_>


   struct MyGrammar
     : or_<
         , bitwise_or<_,_>

IMO, eliminating the operators:: namespace would be better. This isn't
half bad:

   struct MyGrammar
     : control::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

Boost list run by bdawes at, gregod at, cpdaniel at, john at