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

Re: [Scheme-reports] Fwd: fresh empty strings



On 01/21/2012 09:54 AM, Vincent Manis wrote:
> My sense of the Scheme consensus on this issue is that empty lists are always eq, but whether empty other things are eq is unspecified. Am I correct?

Note the cases of mutable string and immutable strings should be 
distinguished.
Likewise for vectors.  I feel it should be:

(eq? "" "") --> unspecified
(eq? (string) (string)) --> #f
(eq? #() #()) --> unspecified
(eq? (vector) (vector)) --> #f

At least as long as the (string) constructor is defined to create a
mutable string, then each call creates a distinct strong object -
even in the zero-length case.
-- 
	--Per Bothner
per@x   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports