Boost logo

Proto :

Subject: Re: [proto] So I heard proto make AST ...
From: Joel.Falcou_at_[hidden]
Date: 2010-08-11 14:03:20


> This is kind of like Proto's evaluation contexts, IIUC. I'm not wild for
> them because often just the tag isn't enough information to find the
> right handler. But maybe it covers enough use cases and can be made
> easier to use. Right now, proto has an "eval" function that takes an
> expression and an evaluation context, but the user is responsible for
> the flow control. Maybe there should be a pre_order_eval and
> post_order_eval that takes on the control flow responsibilities.

Yes but here each tag specialization leaves in its own function object and
not as an operator()().

For sepcific need, we can specialize based on tag+type of visitor+type of
"visitee".

> Tags don't have arities. E.g. nothing prevents someone from creating an
> expression with tag::plus and 5 children.

Yes but the same way proto operator has the expected behavior by defualt,
one can expect they have expected arity.


Proto list run by eric at boostpro.com