Open spaghettisalat opened 6 years ago
I think the example was (incorrectly) trying to show a use of sharp-backslash with an unknown character name. The actual test case was '#\GARBAGE', not '#garbage'. But someone forgot that it was inside string quotes which would have mandated writing "#\GARBAGE" to make it a correct test. I really think that's an inadvertent oversight, as nowhere does it say that a dispatching macro should ignore any unknown character as the dispatch character (the letter 'g' if the example is to be taken literally) whereas it does make clear that the sharp-backslash syntax must disregard unknown character, if the example is to be taken illustratively. For comparison's sake, notice that every other test case uses a dispatch character that is valid, as in '#c1.2', '#RALPHA'.
Yes, that's true actually, I didn't consider that. However I still think that not signaling an error when encountering an undefined dispatch macro character serves the intended function of *read-suppress*
better, even if it is not required by the standard.
The following example from the CLHS documentation on read-suppress (http://www.lispworks.com/documentation/HyperSpec/Body/v_rd_sup.htm)
produces an error, instead of quietly ignoring the undefined dispatch macro character.