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: Alfred M. Szmidt
Subject: Re: Internationalize Emacs's messages (swahili)
Date: Sun, 27 Dec 2020 18:17:41 -0500

   On Sun 27 Dec 2020 at 17:32, "Alfred M. Szmidt" <ams@gnu.org> wrote:
   >    Because people say (if (= (length foo) 0)) all over the place,
   >    without caring whether foo is a list, a string, or whatever, and I
   >    want them to be able to say (if (length= foo 0)) with the same
   >    confidence and convenience.
   >
   > If the goal is to avoid writing bad code,

   The goal is to avoid writing bad code and also to easily fix existing
   bad code.

If (> (length foo) 10) is bad or not depends entierly on its context.

   > then one should definitly not be introducing something like length= as
   > a means to evade it, since both those forms are to be avoided.

   Why?

If foo is a list, then you should use null.  If foo is a string, you
should use string-empty-p.  If foo is some other, you should use that.



reply via email to

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