Barry Margolin
12/15/2015 5:40:00 PM
In article <7b7f5dde-1a67-4ec0-bd5e-5a6c9dad5872@googlegroups.com>,
Jim Newton <jimka.issy@gmail.com> wrote:
> >
> > You are right. I banged out the above in CLISP which accepts &whole
> > anywhere.
> >
> > It's easier to recognize &whole anywhere, like &environment, than to add
> > gratuitous logic to generate a diagnostic when it's not at the front.
> >
> > "You used &whole, but a boolean flag added just for this purpose tells
> > me we're not at the front of the lambda list any more. Bad programmer!"
>
> Perhaps that's one way to look at it. Another way to look at it is that the
> spec says &whole
> has special meaning only if it appears before all required arguments,
> otherwise it is simply
> a normal variable. According to my reading of the spec (lambda (a &whole)
> ...) is a binary function.
> Am I reading something wrong?
Since &whole only has a special meaning in macro lambda lists, not
ordinary functions, that is indeed a binary function.
I wouldn't mind an implementation displaying a warning about random
function/macro arguments beginning with &, though.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***