
David Abrahams wrote:
Joel de Guzman <joel@boost-consulting.com> writes:
Hi. Here's a preview of Phoenix V2. This will probably be the last release of the library. Phoenix V2 will be the basis of the Phoenix and Boost.Lambda merger.
If these basic rules are not followed, the result is either in error, or is immediately evaluated. Some examples:
var(x) = 123 // good (lazy) x = 123 // oops (immediate) var(x)[0] // good (lazy) x[0] // oops (immediate) var(x)[var(i)] // good (lazy) x[var(i)] // bad and illegal (x is not a phoenix primitive or composite) var(x[var(i)]) // bad and illegal (x is not a phoenix primitive or composite)
I would avoid attaching value judgements, and in this case, vertically align the comments:
x = 123 // immediate var(x) = 123 // lazy
x[0] // immediate var(x)[0] // lazy
var(x)[var(i)] // lazy x[var(i)] // illegal (x is not a phoenix primitive or composite) var(x[var(i)]) // illegal (x is not a phoenix primitive or composite)
Done. Thanks!
And this leaves me wondering what about:
var(x)[i]
Lazy. Equivalent to: var(x)[val(i)] Added to the examples. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net