That's great to hear. In that case, I'll just use SubString for now and not 
open an issue.

Will there be any change to iterators as well? I ask this in part because I 
was looking into using iterators to strings instead, but I wasn't getting 
very good performance.

On Wednesday, June 11, 2014 10:25:14 AM UTC-4, Stefan Karpinski wrote:
>
> We're planning a major revamp of string and I/O functionality in 0.4, so 
> this will all very likely change in the near future. Strings will be much 
> more lightweight and efficient, and SubStrings will be the same as Strings.
>
>
> On Wed, Jun 11, 2014 at 10:17 AM, Milan Bouchet-Valat <[email protected] 
> <javascript:>> wrote:
>
>>  Le mercredi 11 juin 2014 à 07:02 -0700, Kevin Squire a écrit :
>>
>>  Actually, Strings are already immutable. Well, mostly. You can't change 
>> a string directly, but you can (but generally shouldn't) modify the backing 
>> array.  
>>
>>  
>>
>>  Given that, I don't know why indexing couldn't return a substring, 
>> although there might be reasons--e.g., calling C code is possible with 
>> ASCIIStrings or UTF8Strings, but SubStrings have to be copied and 
>> null-terminated (I think this already happens).  
>>
>> Yeah, you are supposed to call bytestring() on strings you pass to C. It 
>> is a no-op for ASCIIString and UTF8String, but not for SubString, for 
>> which it creates a copy.
>>
>>
>> Regards 
>>  
>
>

Reply via email to