all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Kangas <stefankangas@gmail.com>, emacs-devel@gnu.org
Subject: Re: master 87e422f: Beef up the Emacs string utility set a bit
Date: Tue, 22 Dec 2020 16:03:23 +0100	[thread overview]
Message-ID: <8984B3E5-1DBF-46D3-85BA-6599095F1C06@acm.org> (raw)
In-Reply-To: <87h7od99se.fsf@gnus.org>

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?)





  reply	other threads:[~2020-12-22 15:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201221175345.27592.89597@vcs0.savannah.gnu.org>
     [not found] ` <20201221175347.9F1B820B76@vcs0.savannah.gnu.org>
2020-12-21 18:24   ` master 87e422f: Beef up the Emacs string utility set a bit Stefan Kangas
2020-12-21 18:32     ` Lars Ingebrigtsen
2020-12-21 18:44       ` Lars Ingebrigtsen
2020-12-21 19:05         ` Stefan Kangas
2020-12-21 20:03           ` Lars Ingebrigtsen
2020-12-21 20:18         ` Basil L. Contovounesios
2020-12-21 20:38           ` Clément Pit-Claudel
2020-12-21 21:11             ` Lars Ingebrigtsen
2020-12-21 21:29               ` Clément Pit-Claudel
2020-12-21 21:32                 ` Lars Ingebrigtsen
2020-12-21 20:20         ` Clément Pit-Claudel
2020-12-21 20:34           ` Lars Ingebrigtsen
2020-12-21 20:44             ` Clément Pit-Claudel
2020-12-21 21:06               ` Lars Ingebrigtsen
2020-12-21 22:13                 ` Basil L. Contovounesios
2020-12-21 22:19                   ` Lars Ingebrigtsen
2020-12-22 10:41         ` Mattias Engdegård
2020-12-22 14:48           ` Lars Ingebrigtsen
2020-12-22 15:03             ` Mattias Engdegård [this message]
2020-12-22 15:24           ` Alfred M. Szmidt
2020-12-21 19:05       ` Stefan Monnier
2020-12-21 19:19         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8984B3E5-1DBF-46D3-85BA-6599095F1C06@acm.org \
    --to=mattiase@acm.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.