Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (23 Jan 2012 13:28 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (23 Jan 2012 15:23 UTC)
Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (23 Jan 2012 15:34 UTC)
Re: [Scheme-reports] fresh empty strings Ray Dillinger (23 Jan 2012 20:17 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (23 Jan 2012 20:52 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (23 Jan 2012 23:05 UTC)
Re: [Scheme-reports] fresh empty strings Vincent Manis (24 Jan 2012 01:02 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (24 Jan 2012 02:06 UTC)
Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym (24 Jan 2012 09:37 UTC)
Re: [Scheme-reports] fresh empty strings John Cowan (24 Jan 2012 15:10 UTC)
Re: [Scheme-reports] fresh empty strings xacc.ide@gmail.com (24 Jan 2012 16:31 UTC)
Re: [Scheme-reports] fresh empty strings Per Bothner (24 Jan 2012 17:21 UTC)
Re: [Scheme-reports] fresh empty strings Andy Wingo (24 Jan 2012 17:00 UTC)
Re: [Scheme-reports] fresh empty strings Aubrey Jaffer (24 Jan 2012 02:16 UTC)

Re: [Scheme-reports] fresh empty strings Alaric Snell-Pym 24 Jan 2012 09:35 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/24/2012 02:06 AM, John Cowan wrote:
> Vincent Manis scripsit:
>
>> In the absence of a procedure for mutating the length of a string,
>> empty strings are immutable.
>
> Yes, but the last few exchanges have been about non-empty but short strings.
>

We've all run off on tangents, and I'm afraid it might be my fault for
suggesting that implementations might well have different
representations for different lengths of strings, as an optimisation...

Bringing it back to reality, however, I think it's fine and good for eq?
of strings to be defined as it is. Two references to the same string
should probably be eq? - (let ((a str) (b str)) (eq? a b)) - so that
they're useful in hash tables, but two references to strings with the
same content should be left undefined to give implementations scope for
implementing strings as in-memory objects, yet still being able to
implement them as immediates or merging known identical strings together
or whatever: (let ((a "hello") (b "hello") (eq? a b)) should not be
defined by the standard.

And, of course, "undefined" doesn't mean it has to return some unique
"undefined value"! Just that the implementation gets to choose.

ABS

- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8ee34ACgkQRgz/WHNxCGo44ACfRff0mIqLLo3D4oRhYQdgJ6uy
fjcAoJFkyQLBZYoQUQID+P3rPGWC9+CE
=fFzF
-----END PGP SIGNATURE-----

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