[Ecls-list] Re: base-string patch

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri May 19 02:18:08 UTC 2006


On Fri, 2006-05-19 at 14:51 +0900, Brian Spilsbury wrote:
> Here is a patch which doesn't add functionality, but instead changes
> string to base-string where appropriate (and maybe in a few
> unnecessary places).
> 
> The reason is that there are many places which use string where they
> should use base-string, and this should preserve their expectations if
> string isn't base-string anymore.

I got your patches. They were too big for the mailing list but they
arrived my inbox. They seem pretty innocent and perhaps it is a good
idea to have a base_string lisp type. I will be testing them in the
weekend.

However there are some design ideas I would like to discuss. I will
write you an email later, or maybe during the weekend -- after I read
some Unicode manuals --. My feeling is that one should still encapsulate
a minimal facility on the ecl_* macros or functions, which would provide
an abstraction layer on top of your script dispatch mechanism and should
work similarly for Unicode-aware and bare-bones ECL.

With this macrology, for instance, you would not need to care about
writing p->base_string.self[i++] = c or p->string.self[i++] = c, but
rather use ecl_setf_schar(p, c). Besides, things like ecl_toupper(c) can
be a function that provides a simple output for (c < 127), as expected
for ASCII, and otherwise dispatches to a script function.

Juanjo

-- 
Max-Planck-Institut für Quantenoptik
Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
Phone: +49 89 32905 345   Fax: +49 89 32905 336
http://www.mpq.mpg.de/Theorygroup/CIRAC/
-------------- 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/ad174c3a/attachment.sig>


More information about the ecl-devel mailing list