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

another question about defmacro lambda lists

    Date: Sat, 24 Jan 87 19:12 EST
    From: Glenn S. Burke <gsb@JASPER.PALLADIAN.COM>

	Date: Fri, 23 Jan 87 15:05 EST
	From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

	    Date: Fri, 23 Jan 87 12:27:25 MST
	    From: sandra%utah-orion@utah-cs.arpa (Sandra J Loosemore)

	    Does it make sense for nested lambda lists in a defmacro to contain things
	    like &environment?  CLtL does not say whether the non-top-level lambda lists
	    should be ordinary function lambda lists or whether they can use the extended

	They certainly need to allow destructuring; it wouldn't make sense to have only
	a single level of destructuring.  I don't think &whole and &environment make
	sense any place other than at the top level, though.

    &whole makes sense for subforms;  you need it if you want a pointer to the subform
    being destructured.  I am assuming it applies to the subform being destructured
    against the lambda-list the &whole occurs in, not that it applies to the outermost

Well, there's something funny here.  Consider:

  (defmacro foo (&rest x &whole y) ...)
  (defmacro bar ((&rest x &whole y)) ...)

In bar, x and y are bound to the same value, but in foo x is bound to
(cdr y).  I suppose it makes sense to allow &whole in bar anyway, but it
could be confusing to some users.