Re: Beginner - Function Critique
- From: Adrian Kubala <adrian-news@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 11:25:08 -0500
On 2005-09-30, crystal1 <crystal1@xxxxxxxxxxxx> wrote:
> (defmacro join-strings (&rest strings)
> "Return the result of concatenating the supplied strings."
> `(concatenate 'string ,@strings))
I'm just going to comment on this one stylistic point -- only use a
macro when you need to control the evaluation of arguments, never in a
case like this where an ordinary function would do. The reason is you
can't use a macro in REDUCE, APPLY, or any other context where you need
to treat it as a first-class value.
.
- References:
- Beginner - Function Critique
- From: crystal1
- Beginner - Function Critique
- Prev by Date: Re: lisp function questions
- Next by Date: Re: lisp function questions
- Previous by thread: Beginner - Function Critique
- Next by thread: Re: Beginner - Function Critique
- Index(es):