4 ms·
Unlike most languages, Lisp defines how strings can be transformed to Lisp ASTs (s-expressions). In Scheme (which doesn't allow reader macros) this is a safe op
by simiones 5y ago
Unlike most languages, Lisp defines how strings can be transformed to Lisp ASTs (s-expressions). In Scheme (which doesn't allow reader macros) this is a safe operation: you can read untrusted input without worry.
By contrast, most other languages only have eval() - which takes a string and parses and executes it as code. In Lisp, eval() takes a Lisp list object and executes that.
- draegtun 5y agoDitto for Rebol & Red. For eg. >> code: load "foreach n [1 2 3 4] [print n * 2]" == [foreach n [1 2 3 4] [print n * 2] ] >> type? code == block! >> do code 2 4 6 8