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

Destructuring and &whole



Sigh.  My example was not an attempt to say "&whole might be used for
detecting failed attempts at destructing."  I don't know if that is how
people read my message, or how people read a reply to that message.  In
any case, that's not what I meant.  There are at least two uses for
non-top-level &whole that I can envision:

 (1) To get a handle on the entire form for reporting purposes.  The
     destructuring may have succeeded (syntax) but the form may be in
     error (semantics).  The error reporter may want to show the entire
     form that failed.  My example tried to show that, but I failed to
     articulate it.
 (2) To get a handle on the entire form because you want the entire
     form.  The destructuring is an error checking mechanism (syntax),
     which should signal an error (the closest CLtL appears to come is
     top of pg151 in saying the construct is "in" error), as well as
     giving you a parsed form of parts of the form for (semantic)
     checking.

"That's just an example, ..." etc.  What is the cost of stipulating that
&WHOLE should work at non-top level vs the cost of dearly wanting it
(after all, there is no LISP:DESTRUCTURING-BIND) and not having it?