| Index: base/callback.h.pump
|
| diff --git a/base/callback.h.pump b/base/callback.h.pump
|
| index e236254d8a3f85aa4a20d79b13f66f631f416918..41d2ee9aecc9c2e3cc723adb7454b8f215deabb6 100644
|
| --- a/base/callback.h.pump
|
| +++ b/base/callback.h.pump
|
| @@ -28,13 +28,18 @@ $var MAX_ARITY = 7
|
| //
|
| // The templated Callback class is a generalized function object. Together
|
| // with the Bind() function in bind.h, they provide a type-safe method for
|
| -// performing currying of arguments, and creating a "closure."
|
| +// performing partial application of functions.
|
| //
|
| -// In programming languages, a closure is a first-class function where all its
|
| -// parameters have been bound (usually via currying). Closures are well
|
| -// suited for representing, and passing around a unit of delayed execution.
|
| -// They are used in Chromium code to schedule tasks on different MessageLoops.
|
| +// Partial application (or "currying") is the process of binding a subset of
|
| +// a function's arguments to produce another function that takes fewer
|
| +// arguments. This can be used to pass around a unit of delayed execution,
|
| +// much like lexical closures are used in other languages. For example, it
|
| +// is used in Chromium code to schedule tasks on different MessageLoops.
|
| //
|
| +// A callback with no unbound input parameters (base::Callback<void(void)>)
|
| +// is called a base::Closure. Note that this is NOT the same as what other
|
| +// languages refer to as a closure -- it does not retain a reference to its
|
| +// enclosing environment.
|
| //
|
| // MEMORY MANAGEMENT AND PASSING
|
| //
|
| @@ -274,6 +279,8 @@ $var MAX_ARITY = 7
|
| //
|
| // By default Bind() will store copies of all bound parameters, and attempt
|
| // to refcount a target object if the function being bound is a class method.
|
| +// These copies are created even if the function takes parameters as const
|
| +// references. (Binding to non-const references is forbidden, see bind.h.)
|
| //
|
| // To change this behavior, we introduce a set of argument wrappers
|
| // (e.g., Unretained(), and ConstRef()). These are simple container templates
|
|
|