[squeak-dev] leadingChar proposal
Philippe Marschall
philippe.marschall at gmail.com
Fri Aug 28 12:29:43 UTC 2009
2009/8/28 Bert Freudenberg <bert at freudenbergs.de>:
>...
> Wouldn't ByteArrays be a better way to efficiently store arrays of bytes?
For arrays of bytes yes, for Latin-1 strings no.
> Strings are conceptually made of Characters, and there are more than 256 of
> them. E.g. a la Python 3:
Sure, there are also Integers bigger than 2^30 - 1, that doesn't mean
that SmallInteger is a stupid idea and should be dropped. Especially
considering that WideStrings still have performance issues and bugs.
> http://www.devx.com/opensource/Article/41398/1763/page/5
3.1 reimplemented a lot of the IO stuff from 3.0 in C for pure speed reasons.
>>> 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).
Yeah, storing that in Text objects instead of Strings seems like the
better way to go.
Cheers
Philippe
More information about the Squeak-dev
mailing list
|