Re: ClojureScript – inter-namespace usage

2012-01-10 Thread Shantanu Kumar
On Jan 10, 2:16 am, David Nolen dnolen.li...@gmail.com wrote: binding works just fine in CLJS. That it doesn't work with required vars sounds like a bug. I filed CLJS-121 for this: http://dev.clojure.org/jira/browse/CLJS-121 Shantanu -- You received this message because you are subscribed

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Stuart Sierra
Hi Shantanu, #1 is a bug. #2 is not possible because `import` doesn't exist in ClojureScript: it doesn't differentiate between host classes and ClojureScript code. Protocols and types should be accessible with normal `require` in ClojureScript. #3 seems unlikely to be implemented.

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Cedric Greevey
On Mon, Jan 9, 2012 at 1:18 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: #3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and it doesn't have threads, so there's not much for `binding` to do. I could see `with-redefs` being supported, however. Actually, the lack of

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Shantanu Kumar
#3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and it doesn't have threads, so there's not much for `binding` to do. I could see `with-redefs` being supported, however. Hi Stuart, Thanks for the pointers. So, I am trying to understand what is the canonical way to write

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Cedric Greevey
On Mon, Jan 9, 2012 at 2:20 PM, Shantanu Kumar kumar.shant...@gmail.com wrote: #3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and it doesn't have threads, so there's not much for `binding` to do. I could see `with-redefs` being supported, however. Hi Stuart, Thanks

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread David Nolen
binding works just fine in CLJS. That it doesn't work with required vars sounds like a bug. On Monday, January 9, 2012, Stuart Sierra the.stuart.sie...@gmail.com wrote: Hi Shantanu, #1 is a bug. #2 is not possible because `import` doesn't exist in ClojureScript: it doesn't differentiate

Re: ClojureScript – inter-namespace usage

2012-01-09 Thread Praki Prakash
I bind *print-fn* and it seems to work fine in my snapshot of master pulled on 12/14. On Mon, Jan 9, 2012 at 6:16 PM, David Nolen dnolen.li...@gmail.com wrote: binding works just fine in CLJS. That it doesn't work with required vars sounds like a bug. On Monday, January 9, 2012, Stuart Sierra

ClojureScript – inter-namespace usage

2012-01-08 Thread Shantanu Kumar
I ran into few issues with compiling ClojureScript sources: 1. ns macro doesn't support docstring; found http://dev.clojure.org/jira/browse/CLJS-86 2. ns macro doesn't support :import (required for defprotocol, defrecord) 3. `binding` doesn't seem to work with vars in :require'd namespaces I