It looks like, due to the way the binding macro is implemented in ClojureScript 
[1], the return value of an empty binding form happens to be the value of the 
right-hand side of the last binding pair – :foo in the example in your post, 1 
in your linked test case. The Clojure implementation of binding [2] is slightly 
different, so an empty binding form in Clojure expands to an empty try block – 
which yields nil in both Clojure and ClojureScript.

The Clojure behavior is probably "more correct" since the ClojureScript return 
value doesn't make any sense in context, but an empty binding form is kind of 
meaningless already.

[1]: 
https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/core.clj#L1104-L1137
[2]: 
https://github.com/clojure/clojure/blob/028af0e0b271aa558ea44780e5d951f4932c7842/src/clj/clojure/core.clj#L1827-L1851

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to