emacs-devel
[Top][All Lists]
Advanced

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

Re: Internationalize Emacs's messages (swahili)


From: Tomas Hlavaty
Subject: Re: Internationalize Emacs's messages (swahili)
Date: Sun, 27 Dec 2020 23:30:49 +0100

On Sun 27 Dec 2020 at 23:03, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>> Like Richard, I think that not all of the functions are needed,
>> because some can be trivially expressed by others.

> Yes, I think <, = and > are the ones that are nice to have.  The /=,
> <= and >= are trivial to express via the others, so I didn't go there.

>> Why do we need to stray from that principle in this case?  And if we
>> must have all of those functions

> People say (if (< (length ...))) and (if (> (length... ))) (and =) all
> over the place -- it's not used as a sorting predicate, so having the
> these three seemed like the minimal set.

It is unlikely that people stop counting all elements of lists.

However, if somebody writes such code, it is almost trivial to fix it
with search and replace:

   "(= (length" -> "(length="
   "(< (length" -> "(length<"
   "(> (length" -> "(length>"
   "(/= (length" -> "(length/="
   "(<= (length" -> "(length<="
   "(>= (length" -> "(length>="

(plus extra closing paren)

The "symmetry" (or exhaustiveness?) here is to assist with easily fixing
bad code with minimum changes, i.e. one does not need to think how to
express it using different code.

Example:

   (<= (length ...) ...)
   ->
   (not (length> ...))

Visually different.  (I hope I got it right:-)

versus:

   (<= (length ...) ...)
   ->
   (length<= ...)

Visually same.

So once in a while, it will be possible to search and replace those bad
cases without any mental overhead, just with visual review.

In any case, thanks for taking initiative and improving this!



reply via email to

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