[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: TAGBODY-CONTENTS (Version 3)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: TAGBODY-CONTENTS (Version 3)
- From: peck@Sun.COM
- Date: Tue, 04 Oct 88 15:15:49 -0700
- In-reply-to: Your message of Tue, 04 Oct 88 17:19:00 -0400; <881004171910.6.KMP@BOBOLINK.SCRC.Symbolics.COM> .
- Resent-date: Tue, 4 Oct 88 18:55 EDT
- Resent-from: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Resent-message-id: <881004185556.0.KMP@BOBOLINK.SCRC.Symbolics.COM>
- Resent-to: CL-Cleanup@SAIL.Stanford.EDU
Is anybody concerned about macros that expand to a tagbody with NIL forms?
If NIL is a statement in a tagbody then they disappear quietly,
especially after a pass by a good compiler.
With the current proposal, though, one will get:
"ERROR: Multiple appearances of tag NIL."
I don't know what current practice is, if code like this has
always signalled an error then this is a total non-issue.
If not, it might be noted as a possible conversion cost.
Code like FOO1 will need to be rewritten to splice like in FOO2.
[sometimes it may not be this easy...]
(defmacro foo1 (&rest args)
`(do () ((test-fn))
,(when (member :bar args) '(do-bar-thing))
,(when (member :baz args) '(do-baz-things))
(do-regular-things)))
(defmacro foo2 (&rest args)
`(do () ((test-fn))
,@(when (member :bar args) '((do-bar-thing)))
,@(when (member :baz args) '((do-baz-things)))
(do-regular-things)))