[Ecls-list] Re: base-string patch

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri May 19 09:05:12 UTC 2006


Hi Brian,

I hope I do not seem too picky. My point is the following: I do not like
the dispatch mechanism to be based on replacing functions and I want to
have the core lisp library available as directly callable C functions.

The reason is efficiency: you do not want to go through the lisp calling
process for each character and at the same time you want the functions
in the core library to have all these standard functions available for
them.

At the same time, Unicode prescribes that the 255 first characters are
for the Latin script. That would mean the effect of the lisp functions
should be predictable at least for base-char and base-string. That would
be really desirable because of performance issues: the core gives
predictable results on base strings and the case of base strings can be
optimized. But perhaps here I lay wrong with my assumption that base
strings are "easy".

1) Handling of scripts could be done, in my opinion, with an object that
encapsulates all functions and which is set in a global variable, say
*unicode-script*. This is more dynamical than function redefinition.

2) If you want to have scripts redefine functions then I would vote for
having a set of functions like ext:unicode-string-upcase,
ext:unicode-alpha-num-p, etc, which are the ones that are redefined and
which are called by the core library (string-upcase, etc) when the input
is not a base-string or a base-char.

The good about the second solution is that users could directly call
these functions if they know that their data is to be handled with a
particular script. And you can add more functions
(unicode-string-titlecase, etc).

Regards,

Juanjo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060519/1b07a00f/attachment.sig>


More information about the ecl-devel mailing list