|
Proto : |
Subject: Re: [proto] Visitor Design Pattern
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-10-24 23:32:57
On 10/25/2010 8:49 AM, Eric Niebler wrote:
> On 10/24/2010 12:59 AM, Joel de Guzman wrote:
>> On 10/24/2010 1:16 PM, Eric Niebler wrote:
>>> Now, what to call the traveral/algorithm/action/on thingy. None of those
>>> feel right. Maybe if I describe in words what it does, someone can come
>>> up with a good name. Given a Proto grammar that has been built with
>>> named rules, and a set of actions that can be indexed with those rules,
>>> it creates a Proto algorithm. The traversal is fixed, the actions can
>>> float. It's called<insert good name here>.
>>
>> Actor
>>
>> std::cout<< actor<char_terminal, my_actions>()(a)<< "\n"; //
>> printing char
>>
>> :-)
>
> Like "visitor", "actor" comes with lots of baggage that we don't want:
>
> http://en.wikipedia.org/wiki/Actor_model
>
> Besides, as these things define algorithms, a name that's a verb would
> be better (std::transform, std::accumulate, etc. are verbs).
That's a totally different synonym. The actor that I meant is
connected to the meaning of "semantic action" and you are using
action/actions anyway (as well as grammars and rules). It's the
same domain.
> How about "evaluate":
>
> proto::evaluate<char_terminal, my_actions>()(a);
Hmmm... :P
Regards,
-- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Proto list run by eric at boostpro.com