Re: [Scheme-reports] Current tickets for the 5th ballot - 281
Andre van Tonder 29 Sep 2011 16:25 UTC
On Thu, 29 Sep 2011, John Cowan wrote:
> Andy Wingo scripsit:
>
>>> #281 Make non-readable objects self-quoting in EVAL
>
> 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)
I don't think this ticket makes any sense. Neither x nor y should be required
to be evaluable. It clashes with modules. It confuses levels. It may cause
problems for systems that invoke a compiler on the argument of EVAL.
If e is a module environment (of which the interaction env. is a special case),
we need to look up the bindings of identifiers, including 'CONS, in the
environment e, to determine the meaning of '(cons 1 2). The environment is a
mapping from identifiers to their meanings. It is not defined on procedure
objects.
On a system that that invokes a compiler on the argument of EVAL, the compiler
may depend on the textual representation of the code '(cons 1 2). It may even
do certain optimizations and rewritings based on the textual representation.
Again, having procedure objects in here confuses levels and can cause problems
for such a compiler.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports