[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[scheme-reports-wg1] Re: [Scheme-reports] Current tickets for the 5th ballot



Andy Wingo scripsit:

> > #281 Make non-readable objects self-quoting in EVAL
>
> Unless I misunderstand, this effectively requires that `eval' is an
> interpreter and not a compiler.  Is that your intention?

Not at all.  It simply means that if you pass EVAL a list of the form
(#<procedure +> 1 2), it is treated as if it were of the form
('#<procedure +> 1 2).  Guile currently accepts the latter but not the
former.

You can reproduce this with

(define e (interaction-environment))
(define x (list 'cons 1 2))
(set-car! x cons)
(define y (list (list 'quote 'cons) 1 2))
(set-car! (cdar y) cons)
(eval x e)
(eval y e)

Of the Schemes I was able to test, only Scheme48/scsh had a problem with
(eval y e), complaining that the procedure object was not a valid datum.

-- 
John Cowan    http://ccil.org/~cowan  cowan@x
'Tis the Linux rebellion / Let coders take their place,
The Linux-nationale / Shall Microsoft outpace,
We can write better programs / Our CPUs won't stall,
So raise the penguin banner of / The Linux-nationale.  --Greg Baker