[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The empty string and other empty strings

From: David Kastrup
Subject: Re: The empty string and other empty strings
Date: Tue, 10 Jan 2012 15:10:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Mike Gran <address@hidden> writes:

>> From: Ludovic Courtès <address@hidden>
>> 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

> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]