[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: Mon, 16 Jan 2012 09:47:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Marijn <address@hidden> writes:

> On 13-01-12 17:39, Mark H Weaver wrote:
>> David Kastrup <address@hidden> writes:
>> However, my mind is not set in stone on this.  Does anyone else
>> here agree with David?  Should we defend the legitimacy of this
>> optimization, and ask the R7RS working group to include explicit
>> language specifying that empty strings/vectors need not be freshly
>> allocated?
> It seems to me that it can't hurt to ask for clarification of this
> issue on scheme-reports. Personally I think the intent of the standard
> is to say that you cannot expect (string) to be un-eq? nor eq? to
> (string), but let's get a broader perspective.

It might be worth pointing out the similarity to (list) and (list) and
'().  I think that eq-ness of memberless structures of type list and
string (which also could allow mutable and immutable variants to be
identical) is worth given separate mention as it is a special case that
has semantics with regard to eq-ness and mutability and "freshly
allocated" that are nowhere as obvious as with content-carrying

Even if the statement results to "can be implemented as", it would avoid
choosing inferior implementation options because of trying to split
hairs on what amounts to a bald head.

David Kastrup

reply via email to

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