Boost logo

Proto :

Subject: Re: [proto] Visitor Design Pattern
From: Eric Niebler (eric_at_[hidden])
Date: 2010-10-23 13:47:59


On 10/23/2010 10:45 AM, Thomas Heller wrote:
> On Saturday 23 October 2010 19:30:18 Eric Niebler wrote:
>> On 10/23/2010 10:12 AM, Eric Niebler wrote:
>>> I've tweaked both the traversal example you sent around as well as my
>>> over toy Phoenix. Tell me what you guys think.
>>
>> Actually, I think it's better to leave the definition of "some_rule"
>> alone and wrap it in "named_rule" at the point of use. A bit cleaner.
>> See attached.
>
> I like that.
> With that named_rule approach, we have some kind of in code documentation:
> Look, here that rule is a customization point.

Exactly.

> Why not just rule? Less characters to type.

I almost called it "rule", but *everything* in Proto is a rule including
proto::or_ and proto::switch_. What makes these rules special is that
they have a name.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Proto list run by eric at boostpro.com