Re: "invalid datums in quotation" should be suppressed
Michael Sperber <[email protected]> Thu, 27 Dec 2012 17:27:21 +0100
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
Jonathan Rees <[email protected]> writes: >> ((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). For now, I'm going to to treat this the same way as `(lambda ())', which is by calling `syntax-violation'. This makes it a hard error rather than a warning, with the possibility of deferring until run-time later. -- Regards, Mike