
David Abrahams wrote:
Joel de Guzman <joel@boost-consulting.com> writes:
Sure, you have to have a way to put primitives together into programs.
When reviewing a language (yes, FC++ *is* a language, or more particularly, an EDSL--embedded domain specific language; sure Spirit is also an EDSL), I analyze it based on the three points I listed above.
The problem, as I see it, is that we already have a DSEL (sorry, I've never seen the "Embedded" placed first) for functional programming in Boost.Lambda that's terser, arguably easier to read, and whose idioms fit more closely with other Boost FP systems (bind, mpl), and existing C++ programming paradigms.
Darn! I always get confused by those acronyms! No wonder I chose "Spirit" instead of an acronym. I always forget them :-o I have to agree though. I prefer the LL-style operator overloading. As I've already pointed out, it's easy to alleviate the problem of immediate evaluation such as: for_each(f, l, cout << "hello, " << _1); by simply prohibiting automatic LHS and RHS conversion such as the above (flag it as a compile error). Instead, ask the user to always use explicit var(x) and val(x) when dealing with lambda expressions: for_each(f, l, var(cout) << val("hello, ") << _1); Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net