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

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

Re: elisp's cl package. Don't understand the notice about eval-when-comp


From: Kevin Rodgers
Subject: Re: elisp's cl package. Don't understand the notice about eval-when-compile
Date: Wed, 25 Mar 2009 20:53:28 -0600
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Xah Lee wrote:
in emacs lisp's CL package documentation “(info "(cl)Overview")”, it
has this passage:

   *Please note:* the "CL" functions are not standard parts of the
Emacs Lisp name space, so it is legitimate for users to define them
with other, conflicting meanings.  To avoid conflicting with those
user
activities, we have a policy that packages installed in Emacs must not
load "CL" at run time.  (It is ok for them to load "CL" at compile
time
only, with `eval-when-compile', and use the macros it provides.)  If
you are writing packages that you plan to distribute and invite
widespread use for, you might want to observe the same rule.

I don't quite understand it.

If i distribute a package xyz.el, which calls

(eval-when-compile (require 'cl))

And, this package does not require users to byte-compile it. Then,
how's the eval-when-compile solve the name conflict problem?

does it imply that if you distribute a package using cl, it must be
byte compiled eventually?

Of course, no library _must_ be compiled.  But the unstated assumption
is that every library is byte-compiled because of the performance
benefits (during loading _and_ execution).

And if you load and execute a compiled library that uses CL macros (but
not CL functions) via eval-when-compile, then the obarray remains pure.
:-)

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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