[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 87e422f: Beef up the Emacs string utility set a bit
From: |
Mattias Engdegård |
Subject: |
Re: master 87e422f: Beef up the Emacs string utility set a bit |
Date: |
Tue, 22 Dec 2020 16:03:23 +0100 |
22 dec. 2020 kl. 15.48 skrev Lars Ingebrigtsen <larsi@gnus.org>:
> I'm not really enthusiastic about any of these names. When we're
> talking about suffixes, we're usually talking about file name suffixes
> like ".png", and this has nothing to do with that.
Suffix and prefix are (in computing and mathematics) generic terms for the
trailing and leading parts of a sequence such as a string. There's nothing in
the words that ties them to file names.
> These are functions
> for limiting the length of a string, and would be called
> `string-truncate' if it hadn't been for `string-truncate-left' already
> existing and doing something else, and `truncate-string-to-width' doing
> something else yet again.
>
> That is, these functions are not for picking out a part of a string, but
> for limiting the length, which makes `string-prefix' misleading as for
> what the intention is.
Naming pure functions after what they return is standard practice. How is that
misleading?
(And who are we to say what the user's intention is?)
- Re: master 87e422f: Beef up the Emacs string utility set a bit, (continued)
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Clément Pit-Claudel, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Lars Ingebrigtsen, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Clément Pit-Claudel, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Lars Ingebrigtsen, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Basil L. Contovounesios, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Lars Ingebrigtsen, 2020/12/21
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Mattias Engdegård, 2020/12/22
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Lars Ingebrigtsen, 2020/12/22
- Re: master 87e422f: Beef up the Emacs string utility set a bit,
Mattias Engdegård <=
- Re: master 87e422f: Beef up the Emacs string utility set a bit, Alfred M. Szmidt, 2020/12/22
Re: master 87e422f: Beef up the Emacs string utility set a bit, Stefan Monnier, 2020/12/21