help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: never use `eval' (was: Re: How to mapcar or across a list?)


From: Emanuel Berg
Subject: Re: never use `eval' (was: Re: How to mapcar or across a list?)
Date: Thu, 16 Jul 2015 01:57:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

John Mastro <john.b.mastro@gmail.com> writes:

> I would use something like this:
>
> (defmacro ...

Macros never liked me, and that is mutual. Are they
really preferrable to `eval'?

> For this (and others like it)

... which are? Do you mean the eval + backquote combo?

> it looks like you could instead simply use e.g.
> (apply #'create-book nil title data)

This is what it looks like:

    (eval `(create-book nil ,title ,@data))

With `apply', won't the last "data" be a list, i.e.

    (a b ... n)

instead of

    a b ... n

?

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]