If you refer a var from another namespace, then you can def a new value for that var, and the def will mutate the other namespace, and other things will go wrong as illustrated in the example below.
FWIW, Clojure disallows this, and refuses to allow you to evaluate a def involving a referred var, and emits an error diagnostic like:
CompilerException java.lang.IllegalStateException: foo already refers to: #'some.name.space/foo in namespace: user, compiling:(NO_SOURCE_PATH:2:1)
Here is a complete example illustrating the issues:
Given:
`
(ns foo.core)
(defn square [x]
(* x x))
`
then do this in a REPL:
`
cljs.user=> (require '[foo.core :refer [square]])
nil
cljs.user=> (var square)
'foo.core/square
cljs.user=> (square 3)
9
cljs.user=> (ns-interns 'cljs.user)
{}
cljs.user=> (defn square [x] (+ x x))
WARNING: square already refers to: foo.core/square being replaced by: cljs.user/square at line 1
'foo.core/square
cljs.user=> (square 3)
6
cljs.user=> (var square)
'foo.core/square
cljs.user=> (in-ns 'foo.core)
nil
foo.core=> (square 3)
6
foo.core=> (in-ns 'cljs.user)
nil
cljs.user=> (ns-interns 'cljs.user)
{square #'cljs.user/square}
cljs.user=> (cljs.user/square 3)
TypeError: Cannot read property 'call' of undefined
at repl:1:105
at repl:9:3
at repl:14:4
at Object.exports.runInThisContext (vm.js:54:17)
at Domain.<anonymous> ([stdin]:41:34)
at Domain.run (domain.js:221:14)
at Socket.<anonymous> ([stdin]:40:25)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
cljs.user=> #'cljs.user/square
'cljs.user/square
cljs.user=> @#'cljs.user/square
nil
`