Clojure

Unintentional redef of bound-fn in clojure.core

Details

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

Description

Found an unintentional redefinition in core.clj:

On line 1285:

(defmacro bound-fn
"Returns a function defined by the given fntail, which will install the
same bindings in effect as in the thread at the time bound-fn was called.
This may be used to define a helper function which runs on a different
thread, but needs the same bindings in place."
[& fntail]
`(bound-fn* (fn ~@fntail)))

On line 3433:

(defn bound-fn
{:private true}
[#^clojure.lang.Sorted sc test key]
(fn [e]
(test (.. sc comparator (compare (. sc entryKey e) key)) 0)))

My initial guess is that the second one should be called bound?-fn as long as it's kosher to put a ? in the middle of an identifier.

I can whip up a patch if a good name is agreed upon.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/225
Hide
Assembla Importer added a comment -

richhickey said: (In [[r:3d8c97a939e5779553c53f47696f7445cf378583]]) fix name conflict - bound-fn. fixes #225

Branch: master

Show
Assembla Importer added a comment - richhickey said: (In [[r:3d8c97a939e5779553c53f47696f7445cf378583]]) fix name conflict - bound-fn. fixes #225 Branch: master

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: