Newsgroups: comp.lang.lisp,comp.lang.lisp.mcl
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uunet!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!lll-winken.llnl.gov!ames!kronos.arc.nasa.gov!philpot
From: philpot@kronos.arc.nasa.gov (Andrew Philpot)
Subject: Re: do-nothing macro generates nil nevertheless
Message-ID: <1995Feb27.211546.25735@ptolemy-ethernet.arc.nasa.gov>
Sender: usenet@ptolemy-ethernet.arc.nasa.gov (usenet@ptolemy.arc.nasa.gov)
Nntp-Posting-Host: kepler.arc.nasa.gov
Organization: NASA/ARC Computational Sciences Division
References: <3iqno7$mab@news.internex.net> <gat-260295131710@milo.jpl.nasa.gov> <3irfm9$1ti@news.internex.net> <Pine.A32.3.91.950227130326.26069J-100000@swim5.eng.sematech.org>
Date: Mon, 27 Feb 1995 21:15:46 GMT
Lines: 24
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:16910 comp.lang.lisp.mcl:6489

In article <Pine.A32.3.91.950227130326.26069J-100000@swim5.eng.sematech.org>,
William D. Gooch <goochb@swim5.eng.sematech.org> wrote:
>On 27 Feb 1995, Dave Yost wrote:
>
>> My point is that some functionality is not provided:
>> namely, the ability of a macro to expand into _nothing_.
>
>Why not just use ,@(the-macro ...) ?  Then if it returns nil, you get 
>nothing.  Of course, it must always return a list for this to work.

I thought of this approach as well.  This has been my tactic in
similar situations in the past.

But I think in Dave Yost's case the invoking context is not
necessarily a backquote templating context, so ,@ might not be
possible.  I believe the example had (PROGN ... (THE-MACRO)), not
`(PROGN ... ,(THE-MACRO)).

Andrew
-- 
- Andrew
			    Andrew Philpot
			 Recom Tech/NASA Ames
		     philpot@ptolemy.arc.nasa.gov
