[Top][All Lists]

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

Re: [PATCH] Unicode Lisp reader escapes

From: Oliver Scholz
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Fri, 05 May 2006 14:31:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> Cc: address@hidden,  address@hidden,  address@hidden
>> From: Stefan Monnier <address@hidden>
>> Date: Thu, 04 May 2006 17:40:28 -0400
>> >> After all, it's there, it works, and as mentioned: there's no
>> >> evidence that the decoding time of \u escapes it ever going to need
>> >> to be fast.
>> > ??? inside the Lisp reader, everything needs to be fast, IMO.
>> Why?
> Because the Lisp reader is the backbone of the Lisp interpreter.
>> IMO the only things that need to be fast are those things whose
>> performance has a visible impact.  I see no evidence that there'll ever be
>> a case where the speed with which we can read \u escapes will matter.
> You don't need to see an evidence of a collapsing bridge to know that
> it must be several times stronger than any imaginable load that could
> ever be put on it.
> In other words, not everything is empirical; there's a thing called
> ``good engineering practice.''
> Sorry for being overly didactic, I'm sure you know all that.  I'm just
> amazed that such a fundamental issue needs evidence.

For the sake of peace: my opinion doesn't probably matter much, but
personally I believe that the changes necessary for a C implementation
of `decode-char' are local enough to be safe. I wouldn't like to
change anything in mule.el or utf-8.el---not even a defvar---, but
maybe I just could make the necessary symbols available to C in

    Qutf_translate_cjk_mode = intern ("utf-translate-cjk-mode");
    staticpro (&Qutf_translate_cjk_mode);


    Qutf_subst_table_for_decode = intern ("utf-subst-table-for-decode");
    staticpro (&Qutf_subst_table_for_decode);

    Qtranslation_hash_table = intern ("translation-hash-table");
    staticpro (&Qutf_subst_table_for_decode);

And then access them from my port of `decode-char's core functionality
like this:    
    SYMBOL_VALUE (Qutf_translate_cjk_mode)
    Fget (Qutf_subst_table_for_decode, Qtranslation_hash_table)

[Well, in fact I already did in my copy of Emacs.]    

16 Floréal an 214 de la Révolution
Liberté, Egalité, Fraternité!

reply via email to

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