<< Back to previous view

[CLJS-457] Implement notion of "unbound", i.e. uninitialized variables, in ClojureScript to mimic Clojure's behaviour Created: 15/Jan/13  Updated: 02/Dec/14  Resolved: 02/Dec/14

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Frank Siebenlist Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None

clojurescript r1552


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

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

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

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."

Comment by David Nolen [ 02/Dec/14 6:20 AM ]

The usefulness of this is dubious.

Generated at Thu Nov 26 00:57:09 CST 2015 using JIRA 4.4#649-r158309.