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

inconsistency in backquote spec?

(setq d '(a . b))

'`(,@d) => `(a . b) or `(a)?

If you read CLtL, pg 350. it says that it's equivalent to
`(,@d . nil)
which is 
(append [,@d] 'nil)
(append d 'nil)
which suggests the correct value is `(a).

If you look at most implementations, and at the examples on pg 351, then
you'd think it should be `(a . b)

However, the example at the bottom of page 350 suggest alternate
"legitimate interpretations" continued on the top of pg 351.  All of
them except the first, consider (APPEND .... D NIL) to be equivalent to
(APPEND ... D), which isn't true if D can be a dotted list.

I tried Ibuki, Franz, Lucid, and Genera.  

In all of them evaluating '`(,@'(a . b)) => `(a . b).

In Ibuki and Lucid '`(,@'(a . b) ,@nil) => '([bq-]append '(a . b) nil)
while in Genera and Franz '`(,@'(a . b) ,@nil) => `(a . b)

Are dotted lists not allowed as values of D?  Is the spec on pg 350
correct, and the examples on pg. 351 incorrect?

I tend to believe the latter.  In which case, all of the readers I tried
are incorrect.  I'm not going to change the Genera reader, though, until
I hear from this list, in case my brain is just wedged.  Can someone
either deconfuse or support me?