Right, This also affects http://clojurescript.net <http://clojurescript.net/>, Joel Martin’s Node bootstrapped ClojureScript REPL and David's http://swannodette.github.io/2015/07/29/clojurescript-17/ <http://swannodette.github.io/2015/07/29/clojurescript-17/> (try (if 0 (prn 1) (prn 2)) in the “Compilation” box and you’ll see a bare if(0) in the emitted JavaScript. (Interestingly, it doesn’t affect Replete—not sure how Replete dodged this one.)
For Planck this is covered with https://github.com/mfikes/planck/issues/144 <https://github.com/mfikes/planck/issues/144> It is also covered upstream via http://dev.clojure.org/jira/browse/CLJS-1423 <http://dev.clojure.org/jira/browse/CLJS-1423> At it root it is an issue with *unchecked-if* misbehaving in bootstrapped mode in a way that has been vexing us, defying explanation. - Mike > On Sep 26, 2015, at 4:57 PM, gvim <[email protected]> wrote: > > Planck (1.6) gives me: > > cljs.user=> (if "" :Truthy :Falsey) > :Falsey > cljs.user=> (if 0 :Truthy :Falsey) > :Falsey > > > This is wrong, according to "Clojurescript Up and Running" and > https://github.com/swannodette/lt-cljs-tutorial : > > ;; 0 is not a false-y value. > > (if 0 > "Zero is not false-y" > "Yuck") > > ;; Nor is the empty string. > > (if "" > "An empty string is not false-y" > "Yuck") > > > Same results in 1.5 so not a version issue. > > gvim > > -- > 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. -- 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.
