[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
quasiquote vs. cons & friends
Date: Thu, 28 Apr 94 17:49:10 -0400
From: Jonathan Rees <firstname.lastname@example.org>
I can't find the relevant section of the report right now, but I
believe we agreed on the idea that redefining one standard name should
have no effect on the behavior of another. So, redefining CONS
doesn't break APPEND, and redefining MEMV doesn't break CASE.
QUASIQUOTE's relation to CONS is just like CASE's to MEMV, so e.g. if
+ has its usual definition then necessarily
`(a . ,(+ 1 2)) => (a . 3)
In implementation terms, definitions of built-in procedures and macros
need to be closed over a sort of hidden copy of the standard
environment, not over the top-level environment that the user sees.
There's no such text in R4RS; this text was added to the IEEE
Standard, at the beginning of section 6.
Note that the wording added to the Standard explicitly differentiates
between redefinition of a variable and modification of a variable. In
the former case, there is a guarantee that other behavior will not be
affected, while in the latter case there is no guarantee.