Clojure

Doc string for "binding" should be explicit about binding in parallel

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.1
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

As Tom mentions here: http://groups.google.com/group/clojure/browse_frm/thread/81fc236d3436d72b
the parallel nature of the bindings created by "binding" does not appear to be documented either in its doc string or at clojure.org.
The doc string for binding should mention it.

A proposal for discussion/approval:

clojure.core/binding
([bindings & body])
Macro
binding => var-symbol init-expr

Creates new bindings for the (already-existing) vars, with the
supplied initial values, executes the exprs in an implicit do, then
re-establishes the bindings that existed before. The new bindings
are made in parallel: all init-exprs are evaluated before the
vars are bound as a group to their new values.

Activity

Hide
Assembla Importer added a comment -

stuart.sierra said: [file:bGPkGOMkir3OYweJe5aVNr]: Patch, very similar to Stephen's docstring

Show
Assembla Importer added a comment - stuart.sierra said: [file:bGPkGOMkir3OYweJe5aVNr]: Patch, very similar to Stephen's docstring
Hide
Assembla Importer added a comment -

stuart.sierra said: (In [[r:ff116fb3a986334e77bc0521167fe89c8e27313d]]) core.clj: binding doc string now says it's parallel, fixes #152

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master

Show
Assembla Importer added a comment - stuart.sierra said: (In [[r:ff116fb3a986334e77bc0521167fe89c8e27313d]]) core.clj: binding doc string now says it's parallel, fixes #152 Signed-off-by: Chouser <chouser@n01se.net> Branch: master

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: