[Top][All Lists]

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

Re: idn.el and confusables.txt

From: Eli Zaretskii
Subject: Re: idn.el and confusables.txt
Date: Sat, 14 May 2011 23:59:22 +0300

> From: Ted Zlatanov <address@hidden>
> Date: Sat, 14 May 2011 12:06:04 -0500
> On Sat, 14 May 2011 19:42:39 +0300 Eli Zaretskii <address@hidden> wrote: 
> EZ> Isn't it better to design the table for efficient use to begin with?
> Yes, and I ask you and the other experts on char-tables to help with
> that design.  I am far from an expert on that topic.

I don't think char-table expertise will help here.  The main issue is
what uses of this data we envision.

> >> But I don't know if markchars.el needs to be terribly fast.
> EZ> I hope we are not introducing another character property for a
> EZ> single use.  Some use, some day might need to do it fast.
> This is premature optimization.

I call it foresight ;-)

> I only have a single use in hand.
> Let's make sure markchars.el is fast and we can optimize for other uses
> when they are needed.

No, let's think what uses we envision, and make the data structure
convenient for those uses.

> Let's say C1, C2, and C3 are confusables mapped to C1.  Then the mapping
> is C1 -> (C2, C3); C2 -> C1; and C3 -> C1.
> The algorithm is "if a character maps to an atom it's confusable with
> it, if it maps to a list the whole lisp is confusable to this
> character."

Should it be a list or a string?  How would you use this mapping?

> So to find all the confusables mapped to a character you
> need at most two lookups.

The RHS of a mapping can be several characters, in which case there's
no reverse mapping and no "confusables mapped to a character", I think.

> In addition to the character mapping we also need a confusable data
> type, which can be SL/SA (single-script) or ML/MA (mixed-script).

What would be a possible use of that?

reply via email to

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