In clojure, set! can only be used on dynamic vars, that are currently bound.
Apparently, clojurescript allows set! on root-bound vars, but I wouldn't
rely on that.
Your use case with matching set! pairs really has the semantics of just
calling def.
‚ÄčA much safer way to temporarily alter the root binding of a var (though
still prone to concurrency bugs), is with-redefs.

I'd really think twice before requiring your users to insert matching pairs
of mutation in their code. It goes against the grain of clojure and is
error-prone.
Why can't on-jsload (is that figwheel's?) just run the update within a
(binding [*warn-on-overwrite* false] ...)?

-- 
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