[Scheme-reports] Fwd: fresh empty strings Vincent Manis (21 Jan 2012 17:54 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings Ray Dillinger (21 Jan 2012 18:13 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings John Cowan (22 Jan 2012 06:11 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings Alex Shinn (22 Jan 2012 06:16 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings John Cowan (22 Jan 2012 06:29 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings Alex Shinn (22 Jan 2012 06:33 UTC)
Re: [Scheme-reports] Fwd: fresh empty strings Per Bothner (21 Jan 2012 19:28 UTC)

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