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

Re: nested comments (please correct lexical scope)

This page is part of the web mail archives of SRFI 62 from before July 7th, 2015. The new archives for SRFI 62 contain all messages, not just those from before July 7th, 2015.



> From: Paul Schlie <schlie@xxxxxxxxxxx>
> 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.

By extending my possibly odd notion of things, if prior to eval:

  '<s-exp> :: {quote <s-exp>] => (quote <s-exp>)
  '<white-space> :: {quote  } =>

was performed by the reader, then possibly by extension:

   #'<s-exp> :: {remove <s-exp>} =>
   #'<white-space> :: {remove  } =>

Possibly thereby preserving Aubrey Jaffer's #; extension?

In summary, thanks for considering these thoughts regardless of the
conclusion reached.