[Scheme-reports] fresh empty strings
Andy Wingo
(20 Jan 2012 21:35 UTC)
|
Re: [Scheme-reports] fresh empty strings
Andy Wingo
(20 Jan 2012 22:03 UTC)
|
Re: fresh empty strings
Arthur A. Gleckler
(20 Jan 2012 22:55 UTC)
|
Re: [Scheme-reports] fresh empty strings
John Cowan
(21 Jan 2012 03:36 UTC)
|
Re: fresh empty strings
Arthur A. Gleckler
(21 Jan 2012 06:56 UTC)
|
Re: [Scheme-reports] fresh empty strings
Andy Wingo
(21 Jan 2012 13:24 UTC)
|
Re: [Scheme-reports] fresh empty strings
John Cowan
(21 Jan 2012 13:34 UTC)
|
Re: [Scheme-reports] fresh empty strings
Andy Wingo
(21 Jan 2012 13:47 UTC)
|
Re: [Scheme-reports] fresh empty strings
John Cowan
(21 Jan 2012 14:38 UTC)
|
Re: [Scheme-reports] fresh empty strings Aubrey Jaffer (21 Jan 2012 18:31 UTC)
|
Re: [Scheme-reports] fresh empty strings
John Cowan
(21 Jan 2012 19:04 UTC)
|
Re: [Scheme-reports] fresh empty strings
Ray Dillinger
(21 Jan 2012 17:05 UTC)
|
| Date: Sat, 21 Jan 2012 09:38:24 -0500 | From: John Cowan <cowan@mercury.ccil.org> | | Andy Wingo scripsit: | | > An empty string (vector, bytevector, etc) does not have any | > locations for the characters, but it does have a location for the | > length. | | How do you figure that? The length is a value associated with the | object, certainly, but since it can't be changed (necessarily, not | just contingently like the locations in a non-empty literal), it | doesn't seem to me to be a location. Although not required by the Scheme Reports, an implementation is free to make the length of a vector or string settable. <http://people.csail.mit.edu/jaffer/scm/Storage.html#Storage>: -- Function: vector-set-length! object length Change the length of string, vector, bit-vector, or uniform-array OBJECT to LENGTH. If this shortens OBJECT then the remaining contents are lost. If it enlarges OBJECT then the contents of the extended part are undefined but the original part is unchanged. It is an error to change the length of literal datums. The new object is returned. If (eq? (vector) (vector)), then (vector-set-length! (vector) 3) would affect all empty vectors, not a good thing. _______________________________________________ Scheme-reports mailing list Scheme-reports@scheme-reports.org http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports