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

Re: Last call: Simple adjustable-size strings

This page is part of the web mail archives of SRFI 118 from before July 7th, 2015. The new archives for SRFI 118 contain all messages, not just those from before July 7th, 2015.



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 <per@xxxxxxxxxxx>
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
> per@xxxxxxxxxxx   http://per.bothner.com/
>