Marijn <hk...@gentoo.org> writes: > On 13-01-12 17:39, Mark H Weaver wrote: >> David Kastrup <d...@gnu.org> 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 variants. 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