[squeak-dev] leadingChar proposal

Bert Freudenberg bert at freudenbergs.de
Fri Aug 28 08:09:53 UTC 2009


On 28.08.2009, at 08:19, Philippe Marschall wrote:

> 2009/8/28 Yoshiki Ohshima <yoshiki at vpri.org>:
>> ...
>>
>>  One question is the roadmap; I would think ByteStrings will be
>> retained for a while (or forever) but may be also phased out.
>
> I would hope that ByteStrings are retained. I don't feel that
> WideStrings as a general replacement for ByteStrings.

Wouldn't ByteArrays be a better way to efficiently store arrays of  
bytes? Strings are conceptually made of Characters, and there are more  
than 256 of them. E.g. a la Python 3:

http://www.devx.com/opensource/Article/41398/1763/page/5

>> And
>> also it would be nice to tag ByteStrings.  The natural order may be  
>> to
>> try to move on to text attribute approach earlier so that the bare
>> representation doesn't matter much.
>
> Can you elaborate a bit?


A Text defines attributes for Character runs in a String. Instead of  
storing the tag in each Character, it could be stored in an attribute  
of the Text. Instead of passing around bare Strings you would pass  
around Text objects (if you need to preserve language tags).

- Bert -





More information about the Squeak-dev mailing list