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

Re: [Scheme-reports] fresh empty strings



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

On 01/21/2012 05:47 AM, Andy Wingo wrote:

> An empty string (vector, bytevector, etc) does not have any locations
> for the characters, but it does have a location for the length.

Nope.  While most implementations do store a length, it
isn't a "location" according to the language of the standard --
ie, it cannot be mutated directly and there is nothing that
is required to treat it as a location rather than as a value.

Because the length of all empty vectors is equal, storing it
multiple times is strictly useless.  Ditto empty strings.

I say it's perfectly fine (desirable, even) for an implementation
to have a distinguished immediate value for the empty string,
the empty vector, etc, the same way there is an immediate value
for the empty list, and for all instances of such entities to
be eq? if they are of the same type.

				Bear


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPGvASAAoJEAOzWkqOibfNnOoH/0TIgTGd7ww6Qvfye45xEJLu
PzGb740MDsYcOsC1fkPRE8GxIMEXCCO8F4uPHAiFhH1YSqw1m3ySuR7Rn2OjvLsl
3uHf8pgpy1a3WNv4XokE6Jc9p8U786PY3Bcy3Y5Ahr6Kkl3BQaBl5NKxmkiv99MF
WBLbB1BjN+4TEaFWGOrS92YlgvQc8mGzxbA14EirysBmsUbGAw+KHGhvVYlidu5M
7Wd6Wq/zwDX5sjRPZNsGyJ0073/9PVt5nKU+AkV6JyP4umv0S7cXJu8d5Zi+rDbL
ekVOO7x5AR13jVZZmqAytwo2yPUO+afMSVoUpA8yJbrxbrHygqIkqygJPSHwBx4=
=3gqP
-----END PGP SIGNATURE-----

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