[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: byte-opt.el addition - optimize list of compile-time constants
From: |
Zack Weinberg |
Subject: |
Re: byte-opt.el addition - optimize list of compile-time constants |
Date: |
Wed, 08 Dec 2004 22:49:13 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Miles Bader <address@hidden> writes:
>> > Note that a possibly safer alternative would be to have the #'
>> > reader macro expand into something less ambiguous during compilation
>> > (e.g., a special non-interned symbol), which the byte-compiler could
>> > then safely interpret inside of constants. This may cause grief for
>> > somebody that uses #' in a non-traditional way, and _expects_ to see
>> > (function (lambda ...)), but that may be an acceptable price.
>>
>> I don't think this is any better than saying that function always
>> means function, even if not evalled.
>
> I think you're wrong. Special reader macros like #' are a lot less
> ambiguous than simple arrangements of ordinary atoms like `function'
> and `lambda'.
Of 462 occurences of the string '(function (lambda' in the Emacs
sources, only about ten are not functions. The exceptions are all
function-constructing routines, and I only saw one of those that was
not a defmacro.
I conclude from this that the breakage involved in having the compiler
look inside quoted forms for (function (lambda ...)) constructs and
compile them would be very limited indeed, and could probably be
reduced to none by (a) not doing this inside a defmacro, and (b)
catching all compile errors and leaving the form alone.
Certainly the breakage here is far less than that involved in my
original proposal of optimizing (list) of constants!
zw
- Re: byte-opt.el addition - optimize list of compile-time constants, (continued)
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Miles Bader, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Miles Bader, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Miles Bader, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/08
- Re: byte-opt.el addition - optimize list of compile-time constants, Stefan Monnier, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Miles Bader, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants,
Zack Weinberg <=
- Re: byte-opt.el addition - optimize list of compile-time constants, Thien-Thi Nguyen, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Richard Stallman, 2004/12/10
- Re: byte-opt.el addition - optimize list of compile-time constants, David Kastrup, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Miles Bader, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, David Kastrup, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Stefan Monnier, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Zack Weinberg, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Stefan Monnier, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, David Kastrup, 2004/12/09
- Re: byte-opt.el addition - optimize list of compile-time constants, Paul Pogonyshev, 2004/12/08