[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

readtable and # "syntax"

    In readtable r the parens should now have exchanged their normal
    functions.  When readtable r is in effect, which of the following is
    correct reader syntax?

    	)defstruct foo a b(	;Ugh!
    	#S(foo 1 2)
    	)defstruct foo a b(
    	#S)foo 1 2(

    The issue is not clear from CLtL, which avoids calling the text after #S
    a "list" and just generally refers to "this syntax".

I think that the stuff following the #S is a list, and in parsing it one
would use the bindings in the current readtable.  So your second example
would be the correct one, in my opinion.  That seems like the
intuitively consistent interpretation to me, if the word "intuitive" can
be used in the presence of so perverse an example.

-- Scott