> #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 code that works the same on both Clojure and
ClojureScript. When I use `binding` my intentions are:
1. Rebind the dynamic vars with common parameters so that the
intermediate calls don't need to pass the args around.
2. Make it local to the current thread if the platform supports multi-
threading.

If ClojureScript were to fall back to internally using `with-redefs`
every time it encountered `binding` that should be OK because there is
no multi-threading on the platform. Is it possible to detect the
current environment (CLJ vs CLJS) and execute separate code based on
that?

Shantanu

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to