From: Maurizio Vitale (maurizio.vitale_at_[hidden])
Date: 2007-06-14 15:42:08
On Jun 14, 2007, at 12:57 PM, Eric Niebler wrote:
> Maurizio Vitale wrote:
>> if you could find a way to completely hide the fact that a
>> terminal is
>> a unary_expr from the user I think it would be much cleaner for
>> a boost::proto release.
> I'll give the issue some thought. One possibility is shoehorn into
> the concept of a nullary expression, which is what terminals should
> rightly be. Of course, what is there already works, so IMO there are
> bigger fish to fry first.
I think "usability" considerations play a big role in a library
acceptance. In this case, for instance,
if one's code is correct everything works fine: just have terminals
first and the unary_expr
But when writing the code in the first instance, the patterns for
terminals may be wrong . It is
not so easy (at least for me) to find what's going wrong in a complex
mesh of transforms when
some other pattern matches unexpectedly. You just get the wrong
result. With some luck this
results in a type error somewhere else, but otherwise finding the
problem in absence
of a meta debugger is, mmm, challenging.
Btw, for now I've wrapped my unary_expr pattern in the following way:
so it is not terrible, but it might bite others in future.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk