[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: do-nothing macro generates nil nevertheless
- To: firstname.lastname@example.org
- Subject: Re: do-nothing macro generates nil nevertheless
- From: email@example.com (Barry Margolin)
- Date: 28 Feb 1995 01:20:05 -0500
- Organization: NEARnet, Cambridge, MA
- References: <firstname.lastname@example.org>, <email@example.com>, <firstname.lastname@example.org>
- Sender: email@example.com
In article <firstname.lastname@example.org> email@example.com (Dave Yost) writes:
>My point is that some functionality is not provided:
>namely, the ability of a macro to expand into _nothing_.
I think the original Common Lisp designers considered the idea of allowing
macros to return multiple values, which would be spliced into the
containing form. Had this been included, a macro could expand into nothing
by returning (values).
However, this is would be a very confusing feature. It works out nicely in
a sequencing form like PROGN, but it doesn't fit in well with function
calls. Consider (print (foo)). This looks perfectly valid, but if (foo)
were to expand into nothing then it would be (print), which is invalid. Or
in (if (foo) (bar) (baz)), if (foo) expands into nothing the then-form
would become the test-form and the else-form would become the then-form!
BBN Internet Services Corp.