The I-expression spec for indentation mentions the abbreviation ' for quote, ` 
for quasiquote, and , for unquote.  It omits ,@ for unquote-splicing, but I 
think that's a spec omission that's easily added.

However, the sample code doesn't really follow the spec, in a useful.  The code 
ITSELF varies the interpretation of abbreviations.  Best I can tell, its 
purpose is so that, at the beginning of a line, if the abbreviation is 
IMMEDIATELY followed by a read-able expression, its scope is that expression.  
But if the abbreviation is followed by whitespace, then its scope is the entire 
line and maybe child lines.  Which is useful.  E.G.:

'x y z
maps to ((quote x) y z)

' x y z
maps to (quote (x y z))

That's really useful.  After the initial line, it maps a ' followed by 
whitespace to (quote), which I'm  rather skeptical of as being useful.

It also handles ".".   So:
 a . b
maps to (a . b).

That's really useful too.  However, it also does some stuff that I'd categorize 
as "data corruption", e.g.:
.
maps to () instead of |.|

Anyway, I think the spec should be modified to discuss these additional 
capabilities - because they're useful.  It may be useful to modify the spec to 
follow the code a little more closely, too; it's tricky to show if the code 
matches the spec or not, because they're so far apart.

Thoughts, comments?

--- David A. Wheeler 

Reply via email to