Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-11-03 16:09:20

Joel de Guzman <joel_at_[hidden]> writes:

> Comments, feedback very welcome!


  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
     in order to illustrate the complete semantics of Phoenix

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at