On 1 Mar 2018, at 21:45, Faré wrote:

You might be interested to know that ACL binds *readtable* on startup to an unmodifieble readtable
(which is a violation of CLHS http://clhs.lisp.se/Body/02_aac.htm :
"The initial readtable is distinct from the standard readtable. It is permissible for a conforming program to modify the initial readtable.")

I don't see this behavior in ACL 10.1 (64 bit) on the Mac:

CL-USER> *readtable*
#<readtable @ #x100022d3a2>
CL-USER> (defun semicolon-reader (stream char)
   (declare (ignore char))
   ;; First swallow the rest of the current input line.
   ;; End-of-file is acceptable for terminating the comment.
   (do () ((char= (read-char stream nil #\Newline t) #\Newline)))
   ;; Return zero values.
CL-USER> (set-macro-character #\; #'semicolon-reader)

The most visible result of this is puri and more than 150 other systems in Quicklisp depending on it, failing to load.

Well, that's a good argument for fixing puri & al, regardless of what
option ASDF picks in the future.
And maybe a good argument for making ASDF strict all the time on all
implementations that allow it.

So as I see it we have *three* options for the `*shared-readtable*`

1. Your original option -- the "initial-ish" readtable (since we can't control when ASDF is loaded) 2. My proposal: a copy of the standard readtable. We should consider what might happen in this case if ASDF is reloaded or upgraded. I don't know if option #1 has this same issue. 3. An unmodifiable standard readtable. I don't believe that this is portably possible, is it? There's no ANSI method (unless I've overlooked something) to make a readtable unmodifiable, and there's no way to access the standard readtable portably (since it isn't required to be unique).

I believe my proposal, #2, is the most portable of all of the solutions, but I am still open to correction.


Reply via email to