3 ms·
You can easily write eval as a regular function, right? Except it needs magical access to the global environment. (Please correct me if I'm wrong; I haven't use
by abecedarius 15y ago
You can easily write eval as a regular function, right? Except it needs magical access to the global environment. (Please correct me if I'm wrong; I haven't used Clojure, just checked out http://clojure.org/evaluation. http://clojure.org/evaluation.)
So I'd blame the definition of Clojure's eval function more than the implementation goals here -- if users had to write (eval foo (the-global-environment)) then you could leave the-global-environment out and still supply a useful eval without any problem in compiling programs.