Re: [Scheme-reports] Fwd: fresh empty strings
Per Bothner 21 Jan 2012 19:27 UTC
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@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports