The js code is generally userland custom renderers (eg a forms library) and 
needs compatibility with as much of the existing js ecosystem as possible. 
Usercode will call back into cljs fns, which means the stack will look like 
cljs-js-cljs-js-cljs-js...

*Ways to do this?*
Just use cljs values in js, like Mori 
<https://github.com/swannodette/mori/blob/e1269ba57955f4f91b7728c8a759314d9af8b999/src/mori.cljs#L10>
.
Deep copy at the boundary
Use immutablejs everywhere, even from cljs code.
Polyfill the immutablejs api against cljs data structures
Copy into frozen regular js objects, use react-addons-update 
<https://github.com/dustingetz/update-in> for immutable operations.

*Factors to consider?*
Performance in simple path
Performance of adapters to 3rd party js
Difficulty of writing js adapters
Difficulty of writing cljs adapters

How costly are these adapters exactly? Has anyone tried to do this?

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to