Re: Daily digest for srfi-130@srfi.schemers.org
John Cowan 13 Apr 2016 00:06 UTC
Jim Rees scripsit:
> 1) One implication of the sharing option is that some of those procedures
> may return immutable strings as results not just when an argument is
> returned, but when a new object is constructed which refers to storage
> shared by one or more arguments. Guile does this currently.
Good point. I've added "If a shared string is returned, it may be mutable
or immutable" to the SRFI. There is of course nothing to prevent R7RS-small
implementations from having procedures that return immutable strings: they
just can't be (most of) the procedures mentioned in R7RS-small.
> 2) The document already says that string cursors become invalid once a
> mutation has been performed on the string they came from. Should the same
> be said if a mutation has been performed on any other string that was the
> result of a shared substring operation on the string this cursor came from?
> (or for that matter any "relative" in the tree of substrings with a
> common original ancestor string?)
I've added "or any string that shares storage with it" to the discussion
of cursor invalidation.
Thanks for bringing up these points.
--
John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org
Values of beeta will give rise to dom!
(5th/6th edition 'mv' said this if you tried to rename '.' or
'..' entries; see http://9p.io/who/dmr/odd.html)