[Top][All Lists]

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

Re: cl-byte-compile-compiler-macro

From: David Kastrup
Subject: Re: cl-byte-compile-compiler-macro
Date: Wed, 05 Apr 2006 21:39:17 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> When I compile quux.el, does that need CL to be loaded?
>>> (Assume quux.el does not load CL itself.)
>>     I think it does, since the accessor function has a byte-compile property
>>     that points to function in cl-macs (cl-byte-compile-compiler-macro).
>> I think it should be possible to compile quux.el without loading CL.
>> I proposed moving that function and its subroutine to subr.el.
>> Will that achieve the goal?
> An alternative solution might be the following which just ignores the
> cl-byte-compile-compiler-macro value unless that function is indeed defined.
> Since compiler-macros are supposed to only provide optimizations but no
> change in semantics, no running them should always be harmless.
> Please install it if you think it's right.

Uh, what?  Am I just confused about the terminology you use?  defmacro
most certainly does not provide optional stuff to the compiler.
defsubst would, but is the result of that called a "compiler macro"
while the result of "defmacro" isn't?

Anyway, I don't even think that a defsubst which might or might not be
executed is a good idea: if the programmer wants to achieve a certain
effect with an optimization, failing to do so should not go unnoticed.

It appears that the current behavior makes it hard to track down the
problem.  I think the solution should be to create better diagnostics
for pinpointing the problem instead of removing them completely.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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