From: David Kastrup <dak@gnu.org>
To: guile-user@gnu.org
Subject: Re: String internals sketch
Date: Wed, 15 Mar 2017 16:46:36 +0100 [thread overview]
Message-ID: <87pohiczkz.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87wpbxru68.fsf@pobox.com
Andy Wingo <wingo@pobox.com> writes:
> Hi :)
>
> On Fri 10 Mar 2017 16:31, David Kastrup <dak@gnu.org> 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
next prev parent reply other threads:[~2017-03-15 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 15:31 String internals sketch David Kastrup
2017-03-10 16:08 ` Andy Wingo
2017-03-10 16:51 ` David Kastrup
2017-03-15 15:46 ` David Kastrup [this message]
2017-03-11 0:30 ` Matt Wette
2017-03-11 6:44 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pohiczkz.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).