I'm reading Aaron Stump's "Directly Reflective Meta-Programming," and it 
appears to me that either he misunderstands Scheme, or that I misunderstand it. 
Are there many Scheme dialects in which his use of quasiquote to embed a 3d 
value would successfully pry open the syntactic term?

(Excerpt below)

Sorry for the OT post,

John



2.1.2   Variables in Meta-Programming

A meta-programming language is scope safe (or hygienic) iff variables may not 
be captured or escape their scopes during computation. Dynamic variables in 
Emacs LISP and Common LISP are a good example of a violation of scope safety 
[30, 24]. Scheme R5RS’s macro language is designed to be scope safe [21]. Other 
constructs in Scheme R5RS, however, enable violation of scope safety, even 
though the language does not have dynamic variables. For a violation of scope 
safety in spirit, though not technically, we have that (caddr ’(lambda (x) x)) 
evaluates to x. According to the R5RS language definition, ’(lambda (x) x) is a 
literal expression, and hence the occurrences of x in it are not variables at 
all, but just (unscoped) literal data. So in this example, a variable has been 
created (namely, the resulting unquoted x), but not by means of removing it 
from its scope. Using quasiquotation, however, the example may be modified to 
give a true violation of scope safety. The following expression extracts the 
variable x from its scope, by transforming the binding lambda expression into a 
piece of literal data, and then extracting and evaluating the quoted variable.

((lambda (y) (eval ‘(car (cdr (cdr ’,y))))) (lambda (x) x))

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to