[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `aset` on strings, changing the size in bytes
From: |
Eli Zaretskii |
Subject: |
Re: `aset` on strings, changing the size in bytes |
Date: |
Sun, 09 Sep 2018 18:17:47 +0300 |
> From: Noam Postavsky <address@hidden>
> Date: Sun, 9 Sep 2018 10:44:25 -0400
> Cc: Richard Stallman <address@hidden>, Stefan Monnier <address@hidden>,
> Emacs developers <address@hidden>
>
> On 9 September 2018 at 02:26, Eli Zaretskii <address@hidden> wrote:
>
> >> Or we could define it to replace a substring:
> >>
> >> (setq s (srep s from to newsubstring))
> >
> > Why not have aset do this under the hood? Then we won't need to ask
> > people to change code that worked for decades.
>
> It's unclear what you mean by that
I meant to make aset cons a new string when it turns out the original
one's data is too small to include the new contents.
> the semantics of aset is to modify the original string, changing
> that would surely break code that worked for decades.
But if we are going to tell people aset won't work in those cases,
that code will be broken as well, no?
- Re: `aset` on strings, changing the size in bytes, (continued)
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/08
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Eli Zaretskii, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Noam Postavsky, 2018/09/09
- Re: `aset` on strings, changing the size in bytes,
Eli Zaretskii <=
- Re: `aset` on strings, changing the size in bytes, Noam Postavsky, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/10
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/09
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/10
- Re: `aset` on strings, changing the size in bytes, Richard Stallman, 2018/09/10
- Re: `aset` on strings, changing the size in bytes, Stefan Monnier, 2018/09/09
Re: `aset` on strings, changing the size in bytes, Helmut Eller, 2018/09/08