ClojureScript

Implement notion of "unbound", i.e. uninitialized variables, in ClojureScript to mimic Clojure's behaviour

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    clojurescript r1552

Description

The following REPL snippets show different behavior for "unbound" vars in cljs and clj:

--------
ClojureScript:cljs.user> (def a nil)
nil
ClojureScript:cljs.user> (def b)

ClojureScript:cljs.user> (= a b)
true
--------
user=> (def a nil)
#'user/a
user=> (def b)
#'user/b
user=> (= a b)
false
--------

As a possible solution, D. Nolen suggested that we could "simulate this by creating a Unbound type and initializing def'ed vars without init expressions to instances of it."

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated: