[racket] Parsing a string into a quoted expr

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Sep 12 19:31:42 EDT 2011

Look up "eval" and "read" in the Racket documentation.  There are some 
related procedures as well.  You'll probably need to define a namespace 
for whatever eval procedure you use, although the documentation is 
unclear.  You might want to use Racket's facilities for sandboxing too, 
depending on what you're doing.  (Or maybe what you really want is to 
define a new language in Racket, which probably won't use "eval" at all.)

Beware that most people never have to use "eval" for proper Racket 
programs, although you might be a rare one.  "eval" tends to be grossly 
overused by new Scheme programmers.  For this, I blame CS texts that try 
to teach a theoretical perspective on the Scheme language, with talk of 
metacircular evaluators and such, but then don't disabuse students of 
the understandable impression that they should be calling "eval" 
directly in real programs.


Posted on the users mailing list.