Re: [boost] [ANN] Phoenix-2 prerelease

Joel de Guzman <joel@boost-consulting.com> writes:
Comments, feedback very welcome!
Basics Almost everything is a function in the Phoenix library that can be evaluated as f(a..n), where n is the function's arity, or number of ^^^^ This notation is not familiar to me. I would have expected: f(a[sub 0], a[sub 1], ...a[sub [italic n]]) (using a made up quickbooky syntax) arguments that the function expects. Operators are also functions. For example, a + b is just a function with arity == 2 (or binary). a + b is the same as add(a, b), a + b + c is the same as add(add(a, b), c). I don't know if remarks like Amusingly, functions may even return functions. We shall see what this means in a short while. assume a background that's compatible with your use of the lambda symbol on that page with no explanation. The expression arg1 % 2 == 1 evaluates to a lambda function. arg1 represents an unsupplied argument. I would say arg1 is a placeholder for an argument to be supplied later or if you need a short term for such a thing, arg1 is lazy argument---a placeholder for an argument to be supplied later However, in this document and in the examples and tests provided, don't be surprised to see the first and second steps juxtaposed. ^ in order to illustrate the complete semantics of Phoenix expressions -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (1)
-
David Abrahams