emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Add some aliases for re-related functions


From: Drew Adams
Subject: RE: Add some aliases for re-related functions
Date: Sun, 3 May 2020 12:47:01 -0700 (PDT)

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]