unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Philippe Vaucher <philippe.vaucher@gmail.com>
Cc: Yuan Fu <casouri@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: RE: Add some aliases for re-related functions
Date: Sun, 3 May 2020 12:47:01 -0700 (PDT)	[thread overview]
Message-ID: <d77ea40e-db1c-4abf-b01c-068b20186531@default> (raw)
In-Reply-To: <CAGK7Mr7_3jeHtA3nxamPBsCoveSchhdNjrBxDaAxgiwKDMrc0A@mail.gmail.com>

[Again, please consider using plain-text, not HTML, in your messages.]

>> It wasn't intended to be taken literally.  But
>> the point behind it (there was one) was just
>> that naming is hard.  It's not easy to find a
>> reasonable and consistent way to name things,
>> including functions.  (I think we agree about
>> that, at least.)
>
> Yes, naming is one of the hardest thing. Still when we see names that could be improved and where most agree shouldn't we try?

Certainly we should.

We should try on a case-by-case basis, not apply
a presumed general rule with a broad brush.

(And yes, Stefan, I realize that no one is saying
to paint _everything_ with the same brush.  It's
a difference of scope/degree.)

> You make it sound like because naming is hard
> bad names are ok

How did I make it sound like that to you?

> or that any new name will be barely better
> as naming is hard.

Again, how did I make it sound like that to you?

> If I strawman your position we could name every
> new function as function5318759 with an incremental
> number because hey naming is hard we might as well
> give up :-)

I wonder what, in anything I've written, could
possibly give rise to such a strawman extension
in your mind?

> I'm joking of course :-)

If you look at the particular half-kidding examples
I showed, you might see that they're not screwball.
Nearly all of them are perfectly reasonable.  And
that's the point of showing them.

With a command such as `flush-lines', if we want to
prefix the name, just what is a good prefix?

Is the command mostly about lines (the type of data
acted on), so perhaps use prefix `lines-'?

Is it mostly about regexp-matching/searching, so
perhaps use prefix `re-'?

Is it mostly about deleting text, so perhaps use
prefix `delete-' (as in one of its aliases)?

The question's a good one.  It suggests we should
examine function names case by case.  And it
suggests there are multiple possibilities, and it's
a judgment call about what's most important for the
name.

Nowhere do I suggest we shouldn't try to get the
best names possible, just because there may not be
any perfect or correct name (impossible, as Stefan
said) or because finding the best name fit is hard
(as he also said).

I agreed with that characterization (in fact, I
emphatically applauded his phrase "hard and
impossible").  Clearly, neither I nor Stefan thinks
that just because it's hard, and ultimately
impossible, we shouldn't bother to get the best
names we can find (agree on).

https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01975.html



  parent reply	other threads:[~2020-05-03 19:47 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 18:28 Add some aliases for re-related functions Yuan Fu
2020-05-02 18:39 ` Eli Zaretskii
2020-05-02 18:43   ` Yuan Fu
2020-05-02 21:21   ` Stefan Monnier
2020-05-02 22:27     ` Drew Adams
2020-05-03  8:33       ` Michael Albinus
2020-05-03 19:07         ` Drew Adams
2020-05-02 19:29 ` Alan Mackenzie
2020-05-02 19:48   ` Yuan Fu
2020-05-02 20:10   ` Philippe Vaucher
2020-05-02 20:13     ` Philippe Vaucher
2020-05-03 14:16       ` Eli Zaretskii
2020-05-04  3:09         ` Richard Stallman
2020-05-04 14:28           ` Eli Zaretskii
2020-05-04 17:12             ` Dmitry Gutov
2020-05-04 17:35               ` Eli Zaretskii
2020-05-04 17:42                 ` Dmitry Gutov
2020-05-04 17:46                   ` Eli Zaretskii
2020-05-04 17:53                     ` Dmitry Gutov
2020-05-02 21:09     ` Alan Mackenzie
2020-05-02 21:51       ` Philippe Vaucher
2020-05-03  9:43         ` Alan Mackenzie
2020-05-03 15:00           ` 조성빈
2020-05-02 22:41       ` Stefan Monnier
2020-05-03 17:14         ` Alan Mackenzie
2020-05-04 10:07       ` João Távora
2020-05-03 14:16     ` Eli Zaretskii
2020-05-03 16:20       ` Yuri Khan
2020-05-03 16:42         ` Eli Zaretskii
2020-05-03 16:50           ` Dmitry Gutov
2020-05-02 21:33 ` Stefan Monnier
2020-05-02 22:10   ` Dmitry Gutov
2020-05-02 22:18     ` Eric Abrahamsen
2020-05-02 22:49     ` Stefan Monnier
2020-05-02 23:13       ` Dmitry Gutov
2020-05-03  3:55         ` Stefan Monnier
2020-05-04  0:29           ` Dmitry Gutov
2020-05-04  3:11             ` Stefan Monnier
2020-05-02 22:44   ` Drew Adams
2020-05-03  3:26     ` Stefan Monnier
2020-05-03  4:37       ` Drew Adams
2020-05-03  8:05         ` Philippe Vaucher
2020-05-03  9:55           ` Alan Mackenzie
2020-05-03 10:26             ` tomas
2020-05-03 15:15             ` Eli Zaretskii
2020-05-03 19:47           ` Drew Adams [this message]
2020-05-04  7:32             ` Philippe Vaucher
2020-05-04  8:20               ` Sending plaintext with Gmail (was: Add some aliases for re-related functions) Kévin Le Gouguec
2020-05-04  8:45                 ` Philippe Vaucher
2020-05-04 15:09                 ` Sending plaintext with Gmail Stefan Monnier
2020-05-04 15:25                   ` Kévin Le Gouguec
2020-05-04 15:29                     ` Lars Ingebrigtsen
2020-05-05  8:13                       ` HTML display in Gnus (was: Sending plaintext with Gmail) Kévin Le Gouguec
2020-05-05  8:24                         ` HTML display in Gnus Lars Ingebrigtsen
2020-05-05  9:26                           ` Kévin Le Gouguec
2020-07-17 17:14                           ` Kévin Le Gouguec
2020-05-04 15:39                     ` Sending plaintext with Gmail Andreas Schwab
2020-05-04 16:51               ` Add some aliases for re-related functions Drew Adams
2020-05-04 17:10               ` Drew Adams
2020-05-04 18:17                 ` Philippe Vaucher
2020-05-04 18:33                   ` Drew Adams
2020-05-05  2:48             ` Richard Stallman
2020-05-04  3:08         ` Richard Stallman
2020-05-04 10:16       ` João Távora
2020-05-04  3:04 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=d77ea40e-db1c-4abf-b01c-068b20186531@default \
    --to=drew.adams@oracle.com \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philippe.vaucher@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).