|
Proto : |
Subject: Re: [proto] Visitor Design Pattern
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-10-25 19:44:37
On 10/26/2010 4:30 AM, Eric Niebler wrote:
[...]
> Voila! The implementation is trivial: one specialization of proto::when
> on the new (incomplete) proto::external type. God, why didn't I think of
> this sooner?
>
> The naming issue goes away completely. There is no fancy new proto
> transform to be named. Also, proto::named_rule goes away, too.
>
> I'm attaching Thomas' (now laughably trivial) traversal_proto.cpp
> example, along with my mini Phoenix, both ported to this new scheme. The
> mini-Phoenix takes the extra step of bundling the actions with the
> parameters into the phoenix environment (doing the unpacking/repacking
> under the covers as necessary).
>
> One potential further simplification would be to give users a nicer way
> to map rules to actions. I'll think about it.
This is awesome, Eric! I thought we had a winner. Now you doubled
the win! :-) Don't stop! ;-)
Regards,
-- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Proto list run by eric at boostpro.com