[alexandria-devel] eval-always, defun-always, etc...

Leslie P. Polzer sky at viridian-project.de
Fri Oct 16 09:15:23 UTC 2009


Attila Lendvai wrote:

> i know that this is a subject that has strong feelings attached to,
> but with recent developments in XCVB the need for (eval-when
> (:compile-toplevel :load-toplevel :execute) ...) has rose, and seeing
> numerous eval-when noise in the code is potentially annoying.

Potentially, yes. That's why I didn't propose to consider EVAL-ALWAYS
in this discussion.

But since you bring it up, my opinion is that EVAL-ALWAYS is a simple
construct that every Lisper should be able to understand without
macroexpanding. Assuming it doesn't do funny things, of course.*

Not so with DEFUN-ALWAYS, though. It's not as general (you might
want to define a variable at compile-time, for example) and it
isn't really obvious what this does to DEFUN, since the connection
to EVAL-WHEN is lost.

So I would be mildly in favor of EVAL-ALWAYS but strongly object
to DEFUN-ALWAYS.

  Leslie

--
* I do get Nikodemus' point that it's another piece you need to consider
when debugging code that uses it, but the point quickly seems moot
once EVAL-ALWAYS has settled into one's mind.

-- 
http://www.linkedin.com/in/polzer





More information about the alexandria-devel mailing list