Mike Gran <spk...@yahoo.com> writes: >> From: Ludovic Courtès <l...@gnu.org> >> A related question: can we have both narrow and wide empty strings? > > The intention is that a string is encoded as wide only if it can't > be encoded as narrow. So _newly created_ empty strings should only be narrow. > > Right now it seems that zero-length shared substring of a wide string is > wide. A zero-length substring still shares the stringbuf of the > original string.
That sounds non-sensical to me. If it does not share any characters with the original string, there is no point in having a buffer (or a wide width) at all. Zero-length substrings should not be abused as pointers carrying any meaning. And they should not keep the original string from being collected. > What do you think about that? Do zero-length substrings need to still > share stringbufs with their parent strings? I consider it more a bug than a feature if they do. -- David Kastrup