Re: nested comments (please correct lexical scope) Paul Schlie 10 Jan 2005 01:56 UTC
> From: Paul Schlie <xxxxxx@comcast.net> >> From: Robby Findler <xxxxxx@cs.uchicago.edu> >> It's just that #; working at the read-level is what makes it useful to me. >> If it works at the lexical level it would be strange. For example, >> parenthesis are typically individual lexemes, so this: >> >> (a #;(a) b) >> >> would go to: >> >> (a a) b) >> >> rather than: >> >> (a b) > > No more than: > > (a '(a) b) => (a (quote a)) b) > > Which is doesn't as ' applies the lexically following <s-exp>, > thereby by applying the same conventions: > > (a #;(a) b) => (a {remove (a)} b) => (a b) > > Just as: > > (a '(a) b) => (a {quote (a)} b) => (a (quote (a)) b) > > Where {} denote operations/transforms applied by the "reader" I suspect that part of my problem is that I also believe that quote ('), unquote(,), etc. reader abbreviations should disallow white-space between the abbreviation symbol and the <s-exp> to which it's applied by the reader. (a 'b c) => (a (quote b) c) (a ' b c) => (a b c) ; warning, unbound quote. As given that lists are constructed from [car cdr] pairs, the expression: (a ' b c) :: [a [' [b [c ]]]] => [a [[quote [b [c ]] ] :: (a (quote b c)) Which is wrong; as opposed to being literally lexically assoc with <s-exp>: (a 'b c) :: [a ['b [c ]]] => [a [[quote [b ]] [c ]]] :: (a (quote b) c) Which I know is irrelevant, but just attempting to explain the basis of my thoughts, as odd or misguided as they may be.