Clojure

consistency with def and Unbound

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: Release 1.5
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

In this example I'd expect `b` to return `Unbound` for consistency.

Clojure 1.5.1
user=> (def a "MyA")
#'user/a
user=> (def a "MyA2")
#'user/a
user=> (def b "MyB")
#'user/b
user=> (def b) ;; unbound b
#'user/b
user=> (def c) ;; unbound c
#'user/c
user=> a
"MyA2"
user=> b
"MyB"
user=> c
#<Unbound Unbound: #'user/c>

Activity

Hide
Alex Miller added a comment -

The docstring for def states that the init? function is optional and that in the case where it is omitted, the root binding is unaffected.

Show
Alex Miller added a comment - The docstring for def states that the init? function is optional and that in the case where it is omitted, the root binding is unaffected.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: