Re: comments on redesign John Cowan (16 Dec 2015 13:40 UTC)
|
Re: comments on redesign
Alex Shinn
(17 Dec 2015 00:35 UTC)
|
Re: comments on redesign
John Cowan
(17 Dec 2015 01:28 UTC)
|
Re: comments on redesign John Cowan 16 Dec 2015 13:40 UTC
Alex Shinn scripsit: > You can probably simplify domain notes of when pre-start > and post-end are valid by stating that, outside of the general > "String Cursors" section, pre-start is never valid, and post-end > is only valid as an end argument. Good idea. > string-cursor-ref and string-ref/cursor are redundant. Oops, yes. I'll keep the latter. > The string-split/cursors signature > (string-split/cursors string [separator [ limit ] ] start end) > suggests start/end are always required, but sep/limit are > optional. That's the intention, but since this has no SRFI-13 counterpart start and end probably should be optional in this case. The idea is that if you want whole strings or indexes, you use SRFI-13, and if you want cursors, you use SRFI-130, but this is an exception. > Splitting on predicate is useful and in my experience more > common than substring. The opposite (tokenizing) and > both operations together (partitioning) can also be useful. I will add string-tokenize/cursors. > string-pad-both/cursors is well defined and useful for centering. I'll consider this, but I am trying to stay within the bounds of SRFI 13. I'll go through the SRFI 13 email archive to see if there's been any discussion of it. > string-compress/cursors is a surprising name, since it has > nothing to do with general compression. There's no ambiguity > in string-remove-consecutive-duplicate-chars/cursors, but if you > want brevity then "collapse" or even "squash" may be better than > "compress". Going with collapse. > I think the missing string searching and string-join are essential. I will add string-contains/cursors, but SRFI 13 string-join makes no provision for substrings (its arguments are list-of-strings, delimiter, and grammar) so there is no need for string-join/cursors. > Other useful procedures: prefix?/suffix?/mismatch, Will add. > string-chop (chop into fixed-length chunks), Will consider, but it goes beyond SRFI 13. > string-replicate (xsubstring), I think this is useless with cursors; the index version in SRFI 13 does the Right Thing. > string-replace (from/to substrings), Will add. > string-translate (from/to chars). Will consider. -- John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org I must confess that I have very little notion of what [s. 4 of the British Trade Marks Act, 1938] is intended to convey, and particularly the sentence of 253 words, as I make them, which constitutes sub-section 1. I doubt if the entire statute book could be successfully searched for a sentence of equal length which is of more fuliginous obscurity. --MacKinnon LJ, 1940