Re: Appropriate case for a macro?
- From: Brian <quickbasicguru@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 10:27:34 -0700 (PDT)
Brian Adkins wrote:
However, this seems like a pragmatic hack since a new variable isIt would be a rather simple macro, but if used that same pattern all
introduced simply for conciseness. Would you consider this an
appropriate case for a macro in Common Lisp?
Perhaps used as follows:
(my-if (> a-long-expression value)
(progn
(foo lhs)
(bar lhs))
(baz lhs))
where a-long-expression has been replaced by lhs
of the time, why not?
If the macro is always going to be invoked with a PROGN with two forms
and one form, you could make it accept three. You could also make it
so you can control what variable the value of a-long-expression is
bound to.
.
- References:
- Appropriate case for a macro?
- From: Brian Adkins
- Appropriate case for a macro?
- Prev by Date: Re: Two questions about eq
- Next by Date: Re: Appropriate case for a macro?
- Previous by thread: Appropriate case for a macro?
- Next by thread: Re: Appropriate case for a macro?
- Index(es):
Relevant Pages
|