[m-rev.] for review: Add string.append_string_pieces.

Julien Fischer jfischer at opturion.com
Wed Nov 6 20:04:38 AEDT 2019


Hi Peter,

On Wed, 6 Nov 2019, Peter Wang wrote:

> On Thu, 31 Oct 2019 18:51:17 +1100, Mark Brown <mark at mercurylang.org> wrote:
>> >
>> >
>> > +%---------------------------------------------------------------------------%
>> > +%
>> > +% Making strings from smaller pieces.
>> > +%
>> > +
>> > +:- type string_piece
>> > +    --->    string(string)
>> > +    ;       substring(string, int, int).    % string, start, end offset
>
> I didn't commit this yet because the substring/3 data constructor
> differs from the (deprecated) substring/3 function and substring/4
> predicate. The former takes (start, end) offsets into the base string,
> whereas the function and predicate take (start, count) arguments.
> That might be a bit confusing.
>
> Perhaps the string_piece constructor should be renamed to between/3,
> or even substr/3. Thoughts? The function and predicate HAVE been
> deprecated for a long time.

Since 2011, which is a few releases ago.  They can be delete now.

Julien.


More information about the reviews mailing list