This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for wiki EvalDefine version 4
author
cowan
comment
ipnr
127.11.51.1
name
EvalDefine
readonly
0
text
Passing a definition to `eval` may or may not work according to R5RS. Furthermore, in many Schemes, but not in R5RS, it's possible to call `eval` with just one argument, implying the interaction environment. I tested the suite of Schemes to determine whether and how it's possible to add definitions to the interaction environment by evaluating the following four forms at the REPL:
{{{
(eval '(define x 32) (interaction-environment))
x
(eval '(define y 55))
y
}}}
The following Schemes allow definition by `eval`:
* Supports both `interaction-environment` and single-argument `eval`: Gambit, Chicken, Bigloo, Kawa, SISC, SCM, Chez, Larceny, NexJ, STklos, !TinyScheme, Sizzle, Spark
* Supports single-argument `eval` but not `interaction-environment`: Racket, RScheme, S7, XLisp, Rep, Elk, UMB, VX, Llava, SXM, !FemtoLisp, Inlab (SXM provides `interaction-environment` but calling it signals an error)
* Supports `interaction-environment` but not single-argument `eval`: Gauche, Scheme48/scsh, Guile, Vicare, Ypsilon, !IronScheme, !SigScheme, Dream, BDC, Sagittarius
The following Schemes do ''not'' allow definition by `eval`:
* Does not support `interaction-environment` or single-argument `eval`: MIT, Mosh, KSi, Oaklisp, Dfsch, Owl Lisp
* Supports both `interaction-environment` and single-argument `eval`, but definitions aren't visible in the interaction environment: Chibi
* Supports `interaction-environment` but not single-argument `eval`, but definitions aren't visible in the interaction environment: Shoe
* Does not support `eval` at all: Scheme 9, Schemik
time
2014-12-28 08:33:07
version
4