From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: Internationalize Emacs's messages (swahili) Date: Sun, 27 Dec 2020 18:17:41 -0500 Message-ID: References: <87o8ivumn5.fsf@telefonica.net> <83pn30pku5.fsf@gnu.org> <86wnx8otoj.fsf@163.com> <834kkbp9vr.fsf@gnu.org> <87czyxuxw6.fsf@db48x.net> <87y2hlt82w.fsf@db48x.net> <87lfdlvsw4.fsf@logand.com> <83h7o8ncly.fsf@gnu.org> <87pn2wudab.fsf@db48x.net> <87mty0c3m1.fsf@gnus.org> <83czywnb86.fsf@gnu.org> <87im8ob707.fsf@gnus.org> <87eejcb6nx.fsf@gnus.org> <875z4ob5c9.fsf@gnus.org> <87a6u09nkq.fsf@gnus.org> <875z4o9jdg.fsf@gnus.org> <87ft3rflw2.fsf@igel.home> <87czyu9a72.fsf@gnus.org> <87k0t2q2t5.fsf@logand.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20591"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org, schwab@linux-m68k.org, eliz@gnu.org, monnier@iro.umontreal.ca To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 28 00:18:45 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktfJE-00059y-7e for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Dec 2020 00:18:44 +0100 Original-Received: from localhost ([::1]:42696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktfJD-0000AN-85 for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Dec 2020 18:18:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktfIJ-0007np-A3 for emacs-devel@gnu.org; Sun, 27 Dec 2020 18:17:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58611) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktfII-0000Jl-5N; Sun, 27 Dec 2020 18:17:46 -0500 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ktfID-00038d-Ew; Sun, 27 Dec 2020 18:17:41 -0500 In-Reply-To: <87k0t2q2t5.fsf@logand.com> (message from Tomas Hlavaty on Sun, 27 Dec 2020 23:52:54 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261942 Archived-At: On Sun 27 Dec 2020 at 17:32, "Alfred M. Szmidt" 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.