
Steven Watanabe <watanabesj <at> gmail.com> writes:
If you want to iterate over all the terms in a transform use fold_tree. I don't see any benefit of flattening the expression, besides making things harder for proto :)
We are talking about a general purpose ET library here. There are n-ary operators and function calls in the RealWorld. So these _must_ be first class citizens in proto. Having (a+b+c+d) represented has expr<sum, etc.> is crucial for what I want to do with proto, namely compile-time analytic differentiation in conjunction with expression simplification. Looking at expressions as tree is only half of the truth and I always found this was lovely (citing Todd V.), but not useful everywhere. Eric took the correct path using the expr<op, typelist> idiom. Lets not step behind that one. Markus