From: ts Date: 2008-05-06T01:33:52+09:00 Subject: Re: String copy-on-write question Robert Klemme wrote: > Interesting. Do you also happen to know why not an additional field is > used that stores the length? I've not understood : it has a field which give it the length of the string, for example with str = '0' * 200 str[100 .. -1] the first object (in str) will have 200 for its length the field length in the new object will have the value 100 > Is the reason maybe usage of C library > string functions that work on zero terminated strings? only matz know this :-) Guy Decoux