"invalid datums in quotation" should be suppressed
Jonathan Rees <[email protected]> Sat, 1 Dec 2012 09:03:48 -0500
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
> ((eval (list 'quote (lambda () 'hello!)) (scheme-report-environment 5)))
Warning: invalid datum in quotation
#{Procedure 8664}
(&warning)
'hello!
>
The spirit of the warning is correct, but there should be follow-through in the form of replacing the (quote ...) form with syntax error code, as happens with other static errors e.g.
> (lambda ())
Warning: invalid expression
(#{Name lambda} ())
(&syntax-error)
'syntax-error
>
(Better would be for a run-time error to result, not just a bogus value.)
The reasoning is the same as that for converting mutable to immutable values when they're quoted, and has to do with supporting cross-compilation and capability security applications. The prohibition is allowed by the Scheme reports (due to the specified syntax of the QUOTE special form).
Best
Jonathan