Re:Clojure – Fascinated, Disappointed, Astonished (2016)
by nickik on Saturday January 25, 2020 @07:34PM
(#22149596)
In Clojure 'def' creates a 'var' and those are global in the namespace.
> The only real reason to not use Def would be if the bound symbol escapes the scope, but that would be ridiculous for a modern language.
Its not 'ridiculous' to have a consistent definition of what something does.
Re:Clojure – Fascinated, Disappointed, Astonished (2016)
by pepper_sauce on Monday January 27, 2020 @06:11AM
(#22158307)
It does exactly what the documentation says it does:
"Creates and interns or locates a global var with the name of symbol and a namespace of the value of the current namespace (ns)."
The only real reason to not use Def would be if the bound symbol escapes the scope, but that would be ridiculous for a modern language.