Ticket #1063 (new enhancement)
Opened 2 years ago
Make the standard readtable read-only
|Reported by:||fare||Owned by:|
|Component:||ANSI CL Compliance||Version:||trunk|
The CLHS Section 220.127.116.11 and the Glossary entry for "standard readtable" say that the standard readtable shouldn't be mutated by conformant programs.
CCL will let it this standard readtable mutated, which can only result in "interesting" bugs down the line for users. While the current CCL behavior is allowed by the standard, it is not helpful (Hence this request being about an "enhancement", not a "bug"). It would be more helpful if at least when SAFETY isn't 0, the standard readtable couldn't be modified.
Note that CCL already does the right thing for the related standard pprint-dispatch table, which it makes read-only with useful error messages when a mutation is attempted. Having that in 1.9 would be great, but in trunk definitely good.
cl-launch -l ccl -i '(with-standard-io-syntax (set-dispatch-macro-character #\# #\} (constantly nil)))' cl-launch -l ccl -i '(with-standard-io-syntax (set-pprint-dispatch (quote (cons (member :foooo))) (function write)))'