Re: for behavior difference between clojure and clojurescript?

2012-03-02 Thread David Nolen
On Thu, Mar 1, 2012 at 3:21 AM, Benjamin Peter wrote: > Hi all, > > thanks for responding. > > On Mar 1, 1:21 am, David Nolen wrote: > > Yes it's a known issue. Right now, = only works for two args. For the > time > > being this is for performance reasons, a decent = is critical. > > I see. Is th

Re: for behavior difference between clojure and clojurescript?

2012-03-02 Thread Benjamin Peter
Hi all, thanks for responding. On Mar 1, 1:21 am, David Nolen wrote: > Yes it's a known issue. Right now, = only works for two args. For the time > being this is for performance reasons, a decent = is critical. I see. Is there a know issues list or is the problem something that should be noted

Re: for behavior difference between clojure and clojurescript?

2012-02-29 Thread David Nolen
Yes it's a known issue. Right now, = only works for two args. For the time being this is for performance reasons, a decent = is critical. The way ClojureScript currently handles multiple arity fns is quite unfortunate from a performance perspective - it uses the JavaScript arguments object. This r

Re: for behavior difference between clojure and clojurescript?

2012-02-29 Thread Neale Swinnerton
i had a cljs repl up and running...here's the comparison and the emitted JS ClojureScript:cljs.user> (= 0 0 0) true ; js => cljs.core._EQ_.call(null,0,0,0); ClojureScript:cljs.user> (= 0 0 1) true ; js =>  cljs.core._EQ_.call(null,0,0,1); ClojureScript:cljs.user> (== 0 0 1) false ; js => (functi

Re: for behavior difference between clojure and clojurescript?

2012-02-29 Thread Alan Malloy
On Feb 29, 2:36 pm, Benjamin Peter wrote: > Hello, > > when I was trying to port a little clojure app to clojurescript I > think I noticed a difference in behavior of the "for" macro. > > I am quite new to clojure and maybe you can tell me where my problem > is or if my assumptions that there migh

Re: for behavior difference between clojure and clojurescript?

2012-02-29 Thread Jordan Berg
Hi, You should be using == for comparison between numbers. (for [a [0 1] b [0 1] :when (not (== 0 a b))] [a b]) has the same results between clojure and clojurescript. Cheers, Jordan On Wed, Feb 29, 2012 at 5:36 PM, Benjamin Peter wrote: > Hello, > > when I was trying to port