Larry Evans
On 06/15/14 08:44, Louis Dionne wrote:
Larry Evans
writes: On 06/06/14 21:18, Louis Dionne wrote:
[...]
IIRC, list uses an evaluator and "tagged" lists where the 1st element in
^^^^ should be lisp
the list is a tag for the operation to be performed and the evaluator dispatches on this tag to do the operation with the operands being the remaining args in the list.
I don't understand which list you are talking about.
OOPS. Very sorry for the typo above. I'm talking about the language, Lisp:
http://en.wikipedia.org/wiki/Lisp_%28programming_language%29
and the pattern I was talking about was called "Polish prefix notation" in the wikipedia article.
Ok, now I understand better. As for your question, I did not follow the development of Spirit X3 close enough to know for sure. However, if you have to store variadic arguments, using a lambda somewhere in there is probably the most efficient way. And as soon as you have stuff in a variadic representation, it's better if you keep it that way because most algorithms will perform better on variadic packs. The way I see it for Boost.Hana, your dispatching system could be used internally as an optimization to dispatch efficient operations on variadics, while keeping the more flexible type class based dispatching interface. I'll keep that on the back of my head for when I start optimizing seriously. Thanks, Louis