4 ms·
Lisp data aren't Turing complete, only a particular interpretation of them (i.e. EVAL), as you know. You're perfectly welcome to call READ on a file and you wil
by tines 6y ago
Lisp data aren't Turing complete, only a particular interpretation of them (i.e. EVAL), as you know. You're perfectly welcome to call READ on a file and you will get unevaluated lisp data back (particularly when you set READ-EVAL to NIL in common lisp).
- fiddlerwoaroof 6y agoREAD is Turing complete, because the reader can execute arbitrary code: the #. read macro alone is enough to ensure this.
- dig1 6y agoIf you set read-eval to false, it will not execute reader macro. [1] [1] http://www.lispworks.com/documentation/HyperSpec/Body/v_rd_eva.htm#STread-evalST http://www.lispworks.com/documentation/HyperSpec/Body/v_rd_e...
- fiddlerwoaroof 6y agoYeah, but I can use SET-MACRO-CHARACTER to define a version that ignores that variable: basically, you should never use CL:READ on untrusted input, unless you control the readtable.