[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC]: replace-region-contents
From: |
Eli Zaretskii |
Subject: |
Re: [RFC]: replace-region-contents |
Date: |
Tue, 05 Feb 2019 18:11:40 +0200 |
> From: Tassilo Horn <address@hidden>
> Date: Tue, 05 Feb 2019 06:57:52 +0100
> Cc: address@hidden
>
> I don't have a preference. I guess Eli might argue that this version
> encourages passing strings around instead of using buffers.
Not just strings, _large_ strings. Small strings are okay, we even
have a special optimization for them. Large strings are much less
efficient, in both memory management and access, than buffers. And in
the context of the function we are talking about, the probability of a
string to be large is IMO very high.
I'm not against a string as an option, though.
> I'd explain in the doc string that in the case of a string return
> value, we're going thru a temporary buffer anyway, so if your
> REPLACE-FN ends in (buffer-substring ...), you're clearly doing
> something wrong...
Right, thanks.
- Re: [RFC]: replace-region-contents, (continued)
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/08
- Re: [RFC]: replace-region-contents, Eli Zaretskii, 2019/02/09
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/09
- Re: [RFC]: replace-region-contents, Stefan Monnier, 2019/02/05
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/06
- Re: [RFC]: replace-region-contents, Marcin Borkowski, 2019/02/06
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/06
- Re: [RFC]: replace-region-contents, Stefan Monnier, 2019/02/06
- Re: [RFC]: replace-region-contents,
Eli Zaretskii <=