Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp>
writes:
> Jan> Maybe putting characters in lrecords for Mule is the way to
> Jan> go. Maybe even with the ugly small-character/big-character
> Jan> thing I reposed for unsigned/signed integers above.
>
> Nope, uh-uh, sorry. There are Emchars in every textual rune. See
> redisplay.h.
I am sorry but what has that got do with it? Or put otherwise: That
is exactly the point. All code that deals with lots of characters
already deals with emchars directly, not with LispObject.
I see two potential problems with lrecord characters. First is
efficiency -- examining characters from Lisp would become even slower
than it is now because it would involve the overhead of "creating" the
character objects. This could be partially solved by implementing the
small/big character thing, but it still wouldn't help with, say, large
Japanese texts.
The second problem is with GC -- any Lisp object storing a character
will then need to be GCPRO'ed. I don't know if this is a big problem
or not, but GCPRO troubles /are/ hard to debug so we should consider
them carefully.