3 ms·
> They needed a data interchange format and I assume it made more sense to use Clojure's primitives than parsing up JSON. Even in JavaScript it's better to par
by lloeki 14y ago
> They needed a data interchange format and I assume it made more sense to use Clojure's primitives than parsing up JSON.
Even in JavaScript it's better to parse JSON instead of eval'ing, because you don't want to execute stuff that would "happen" to be contained in the data interchange format.
- lucian1900 14y agoThey aren't evaluated in Clojure, they are read by the reader.
- Tuna-Fish 14y agoThe word REPL comes from lisp and means Read Eval Print Loop. The significance is that unlike in, say, python, Read and Eval are separate. Read reads a string and turns it into an in-memory data structure, Eval takes a data structure (not a string!) and evaluates it. Using Read in a lisp is typically safe, so long as you turn off reader macros and the like.
- lloeki 14y ago> The significance is that unlike in, say, python, Read and Eval are separate. They are separate: * http://docs.python.org/library/ast.html#ast.parse * http://docs.python.org/library/ast.html#ast.literal_eval