Re: Last call: Simple adjustable-size strings
Shiro Kawai 08 May 2015 07:33 UTC
Ok then, how about adding a note in string-replace! section,
something like this?
Note: Srfi-13 has a nondestructive version, string-replace, which
takes the arguments in the following order:
(string-replace dst src dst-start dst-end [src-start [src-end]])
We adopt a different argument order here to be consistent to
string-copy!, and existing string-replace! implementations.
>From: Per Bothner <xxxxxx@bothner.com>
Subject: Re: Last call: Simple adjustable-size strings
Date: Thu, 07 May 2015 23:59:03 -0700
> On 04/26/2015 04:44 PM, Shiro Kawai wrote:
>> A minor point, which I should've brought up much earlier---the
>> argument order of string-replace! is different from srfi-13
>> string-replace; the latter takes src string as the second argument,
>> before the positions.
>> The order in this srfi may make more sense, but I'm afraid
>> that having different argument order in very similar named
>> procedures cause confusions in future.
>
> It's unfortunate, but:
> (1) The specified argument order for string-replace! is documented
> and in the wild in Kawa 2.0.
> (2) It's not a *direct* conflict.
> (3) I think it's more valuable to be compatible with the
> argument order instring-copy!.
> --
> --Per Bothner
> xxxxxx@bothner.com http://per.bothner.com/
>