Re:Rich Hickey: extensible data notation
by Tuna-Fish on Friday September 07, 2012 @08:03AM
(#4488623)
The 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.
> 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
Re:Rich Hickey: extensible data notation
by lucian1900 on Friday September 07, 2012 @04:12AM
(#4488081)
They aren't evaluated in Clojure, they are read by the reader.
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.