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.

Ticket 281: Make non-readable objects self-quoting in EVAL

2011-09-29 22:11:03
WG1 - Core
alexshinn
major
cowan
wontfix
source
closed
2011-09-22 19:07:00
defect

Currently, it's undefined what happens if the first argument to eval is a list containing objects which have no datum representation, such as procedures, records, the end of file object, and so on. I propose that we require eval to treat all these objects as self-quoting. In particular, that means that a list whose car is a procedure (as opposed to an expression which evaluates to a procedure) is evaluated as a function call.

I tested this last case on my usual battery of Schemes. Racket, Bigloo, Guile, Kawa, SISC, Larceny, STklos, SigScheme, Elk, UMB, VX were able to evaluate a list with the cons procedure in the car. Gauche, Gambit, Chicken, Scheme48/scsh, Chibi, Chez, SCM, Ikarus, Ypsilon, Mosh, IronScheme rejected it; however, only Scheme48/scsh had a problem with quoted procedure objects.

I was not able to test MIT, KSi, Scheme 9, Scheme 7, Oaklisp due to difficulties with their eval procedures (Scheme 9 has none).

descriptionCurrently, it's undefined what happens if the first argument to `eval` is a list containing objects which have no datum representation, such as procedures, records, the end of file object, and so on. I propose that we require `eval` to treat all these objects as self-quoting. In particular, that means that a list whose car is a procedure (as opposed to an expression which evaluates to a procedure) is evaluated as a function call. I tested this last case on my usual battery of Schemes. Racket, Bigloo, Guile, Kawa, SISC, Larceny, STklos, !SigScheme, Elk, VX were able to evaluate a list with the `cons` procedure in the car. Gauche, Gambit, Chicken, Scheme48/scsh, Chibi, Chez, SCM, Ikarus, !IronScheme, UMB rejected it. I was not able to test MIT, KSi, Ypsilon, Mosh, Scheme 9, Scheme 7, Oaklisp due to various problems, typically the inability to specify a standard environment to `eval` in a standard way.Currently, it's undefined what happens if the first argument to `eval` is a list containing objects which have no datum representation, such as procedures, records, the end of file object, and so on. I propose that we require `eval` to treat all these objects as self-quoting. In particular, that means that a list whose car is a procedure (as opposed to an expression which evaluates to a procedure) is evaluated as a function call. I tested this last case on my usual battery of Schemes. Racket, Bigloo, Guile, Kawa, SISC, Larceny, STklos, !SigScheme, Elk, UMB, VX were able to evaluate a list with the `cons` procedure in the car. Gauche, Gambit, Chicken, Scheme48/scsh, Chibi, Chez, SCM, Ikarus, Ypsilon, Mosh, !IronScheme rejected it; however, only Scheme48/scsh had a problem with ''quoted'' procedure objects. I was not able to test MIT, KSi, Scheme 9, Scheme 7, Oaklisp due to difficulties with their `eval` procedures (Scheme 9 has none).
resolutionwontfix
statusnewclosed

Given the loud complaints about this, and the fact that the quoted version works in all Schemes but one, I am withdrawing this ticket.