[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Internal visibility
From: |
Han-Wen Nienhuys |
Subject: |
Re: Internal visibility |
Date: |
Wed, 11 Jun 2008 01:05:52 -0300 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080501) |
Ludovic Courtès escreveu:
>>> Guile's string API is aiming not to be 8-bit-assuming, and I would
>>> guess from the code above that the C++ string class is 8-bit-assuming.
>> Sorry, I guess I don't understand. What _is_the assumption for
>> representing strings in GUILE?
>
> Strings in Guile will eventually be sequences of Unicode code points (as
> opposed to "bytes"), which can be represented in a variety of different
> ways (UTF-8, UCS-4, etc.). How Guile represents strings and whether
> this representation "changes dynamically" (as you suggested) should not
> be exposed to the applications in order to leave as much freedom as
> possible to Guile's implementation strategy.
I think that a sequence of Unicode code points this is a somewhat
limited view of how strings should be used. Among others, the
implication is that programs cannot rely on being able to index a
string in O(1) time (since the string might be UTF-x encoded).
What do I use if I want to have guaranteed O(1) indexing -that is- if
I want to manipulate strings of bytes?
How would I read the contents of a binary file without jumping through
encoding hoops?
FWIW, I think ttn's suggestion is an excellent one.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: Internal visibility, (continued)
- Re: Internal visibility, Han-Wen Nienhuys, 2008/06/01
- Re: Internal visibility, Neil Jerram, 2008/06/09
- Re: Internal visibility, Han-Wen Nienhuys, 2008/06/09
- Re: Internal visibility, Ludovic Courtès, 2008/06/10
- Re: Internal visibility, Thien-Thi Nguyen, 2008/06/10
- Re: Internal visibility, Ludovic Courtès, 2008/06/10
- Re: Internal visibility, Thien-Thi Nguyen, 2008/06/11
- Re: Internal visibility, Ludovic Courtès, 2008/06/11
- Re: Internal visibility, Mike Gran, 2008/06/12
- Re: Internal visibility, Ludovic Courtès, 2008/06/23
- Re: Internal visibility,
Han-Wen Nienhuys <=
- Re: Internal visibility, Ludovic Courtès, 2008/06/11
- Re: Internal visibility, Clinton Ebadi, 2008/06/11
- Re: Internal visibility, Ludovic Courtès, 2008/06/11
- Re: Internal visibility, Han-Wen Nienhuys, 2008/06/14
- Re: Internal visibility, Ludovic Courtès, 2008/06/23
- Re: Internal visibility, Neil Jerram, 2008/06/11