Closed zacque0 closed 1 year ago
The documentation (https://github.com/melisgl/named-readtables#33-preregistered-readtables) says that
- NIL, :STANDARD, and :COMMON-LISP designate the standard readtable.
Apart from brevity, I'm not sure what the reason was for including NIL here. Since it's a documented feature that's been out there for many years, I'd very reluctant to change it. And even if that was changed, (:merge nil)
would be an error because :merge
is to be followed by a list of readtable designators spliced into the same list as in (:merge . designators)
, e.g. (:merge :this :and :that)
.
The documentation (https://github.com/melisgl/named-readtables#33-preregistered-readtables) says that
- NIL, :STANDARD, and :COMMON-LISP designate the standard readtable.
My bad, I read too deep from DEFREADTABLE into the MERGE-READTABLES-INTO and MAKE-READTABLE APIs section, and missed the NIL in this sentence.
Apart from brevity, I'm not sure what the reason was for including NIL here. Since it's a documented feature that's been out there for many years, I'd very reluctant to change it. And even if that was changed,
(:merge nil)
would be an error because:merge
is to be followed by a list of readtable designators spliced into the same list as in(:merge . designators)
, e.g.(:merge :this :and :that)
.
I see, thanks for your comment!
Hi,
It's not obvious that the
(:merge nil)
clause indefreadtable
is equivalent to(:merge :standard)
and(:merge :common-lisp)
.[1] As a user, I expect
(defreadtable abc (:merge nil))
as merging empty readtable to an initial empty readtable, thus should result in an empty readtable, like the arithmetic0 + 0 = 0
.[2] Thus, to obtain an empty readtable with
defreadtable
, I have to either use(:merge)
or omit the:merge
clause all together.Is this behaviour going to change (to as described by [1] above), or am I expected to work around this issue (with workarounds as described in [2])?
Thanks!
Version: Git commit d5ff162
Codes to illustrate the issue: