[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using libunistring for string comparisons et al
From: |
Andy Wingo |
Subject: |
Re: Using libunistring for string comparisons et al |
Date: |
Wed, 30 Mar 2011 11:03:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi Mark!
I think UTF-8 could be a good plan for 2.1/2.2, but I wanted to make
sure we understand what string-ref is good for...
On Sat 12 Mar 2011 00:09, Mark H Weaver <address@hidden> writes:
> I claim that any reasonable code which currently uses string-ref and
> string-set! could be more cleanly written using string ports or
> string-{fold,unfold}{,-right}.
Folding and unfolding traverses the entire string. Sometimes this is
indeed what you want.
But sometimes you want to search in a string, roll back and forward,
keep pointers to various parts in the string, etc. Integer indices work
well as pointers to parts of strings, is what I'm saying here. They are
immediate values that can be compared with < and >.
Any change to Guile's internal character encoding should not start from
the premise that string-ref is obsolete or unimportant, especially
considering that there is no other standard "string pointer" mechanism.
Regards,
Andy
--
http://wingolog.org/
- Re: Using libunistring for string comparisons et al, (continued)
- O(1) accessors for UTF-8 backed strings, Mark H Weaver, 2011/03/12
- Re: O(1) accessors for UTF-8 backed strings, Alex Shinn, 2011/03/12
- Re: O(1) accessors for UTF-8 backed strings, Mark H Weaver, 2011/03/15
- Re: O(1) accessors for UTF-8 backed strings, Alex Shinn, 2011/03/15
- Re: O(1) accessors for UTF-8 backed strings, Andy Wingo, 2011/03/19
- Re: O(1) accessors for UTF-8 backed strings, Andy Wingo, 2011/03/30
- Re: Using libunistring for string comparisons et al,
Andy Wingo <=
- Re: Using libunistring for string comparisons et al, Ludovic Courtès, 2011/03/31
- Re: Using libunistring for string comparisons et al, Ludovic Courtès, 2011/03/12