guile-user
[Top][All Lists]
Advanced

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

Re: String internals sketch


From: David Kastrup
Subject: Re: String internals sketch
Date: Wed, 15 Mar 2017 16:46:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Andy Wingo <address@hidden> writes:

> Hi :)
>
> On Fri 10 Mar 2017 16:31, David Kastrup <address@hidden> writes:
>
>> a) Guile already uses two different internal representations: basically
>> UCS-8 and UCS-32.  Adding more internal representations could be done
>> using a number of tables indexed by the internal representation type,
>> making string representations sort of a "plugin".
>
> I think we probably want to avoid this if we can.  We gain a number of
> efficiencies if we can be concrete.

Maybe use GOOPS on the string ops by diversifying on string subtypes?
One would start by making UCS-32 and UCS-8 string implementations
subtypes of strings, then add UTF-8-internal (which is identical to
UTF-8 for all-valid UTF-8)?  I doubt that this would beat a vector of
dedicated hooks but it might look more transparent to implementors with
special needs?  Maybe not: they might not approach this from a Guile
angle of thinking.

-- 
David Kastrup




reply via email to

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