[Top][All Lists]

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

Re: [Emacs-diffs] master c75eb10: Don't change byte-compile-delete-error

From: Noam Postavsky
Subject: Re: [Emacs-diffs] master c75eb10: Don't change byte-compile-delete-errors at runtime (Bug#27340)
Date: Sat, 24 Jun 2017 10:36:39 -0400

On Sat, Jun 24, 2017 at 10:26 AM, Stefan Monnier
<address@hidden> wrote:
>>     * lisp/emacs-lisp/eieio-core.el: Confine `cl-declaim' calls to compile
>>     time.
> [...]
>> -  (cl-declaim (optimize (safety 0)))
>> +  (eval-when-compile (cl-declaim (optimize (safety 0))))
> I'd argue that cl-declaim should have no effect when interpreted, just
> like (defvar foo).  At least, that's how I understand the difference
> between CommonLisp proclaim and declaim.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node104.html (bottom of
page) says:

    declaim {decl-spec}*

    This macro is syntactically like declare and semantically like
    proclaim. It is an executable form and may be used anywhere
    proclaim may be called. However, each decl-spec is not evaluated.

    If a call to this macro appears at top level in a file being
    processed by the file compiler, the proclamations are also made at
    compile time.

Which suggests that declaim's effects are a superset of proclaim's
effects. But then it also says

    As with other defining macros, it is unspecified whether or not
    the compile-time side effects of a declaim persist after the file
    has been compiled

So I guess we could drop the effects at runtime?

reply via email to

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