From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Declaring Lisp function types Date: Sat, 16 Mar 2024 17:44:36 +0200 Message-ID: <86msqy5ggr.fsf@gnu.org> References: <87y1ajtl2h.fsf@neko.mail-host-address-is-not-set> <86wmq3732h.fsf@gnu.org> <87v85mthwz.fsf@neko.mail-host-address-is-not-set> <86sf0q5l0v.fsf@gnu.org> <87o7betech.fsf@neko.mail-host-address-is-not-set> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39882"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, emacs-devel@gnu.org, stefankangas@gmail.com To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 16 16:45:23 2024 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 1rlWDq-000A9V-Ql for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Mar 2024 16:45:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlWDD-0003EB-Ce; Sat, 16 Mar 2024 11:44:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlWDB-0003Ds-1j for emacs-devel@gnu.org; Sat, 16 Mar 2024 11:44:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlWDA-0005zT-Ns; Sat, 16 Mar 2024 11:44:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nILe2hcsz+xrV7ihfjp/wjsDcJVmnnK0YABjNerk3lU=; b=pVjZfbJPsDyM UXP04ua7fDlfWFpDXFteGpCKLihMFi3FMcH+tGqKQsfZnQxtKBM/cTlWCtVgfJIqVX8/xd+v3+imF oF2K9Ue+Dn2agWQVNxz5aHIOGyGKngvvxosb5zBSI1O3pDbyQjt3LV99uoLCONVexxUIdIanpWk2z ++AnhZ8O5IWh+iCiB7+Q4GZeNECZbw9TF4NwscQBvMhUZBV2vB3LwFco8ykei0wiPwDZ7gxTAMWz3 NWM0QcnxB9oRcsVSIfIwSCFc6KpmUd6K/SfOHdsoJvxeDmmi+8LicCYCMyrnRt8pdt9J/XvTEMI4y t4KRqJG5ddM3gBcMQUaOcA==; In-Reply-To: <87o7betech.fsf@neko.mail-host-address-is-not-set> (message from Tomas Hlavaty on Sat, 16 Mar 2024 15:56:30 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317117 Archived-At: > From: Tomas Hlavaty > Cc: acorallo@gnu.org, emacs-devel@gnu.org, stefankangas@gmail.com > Date: Sat, 16 Mar 2024 15:56:30 +0100 > > On Sat 16 Mar 2024 at 16:06, Eli Zaretskii wrote: > > Yes, but who would search for names that are symbols > > of a programming language? > > I do search for lisp symbols all the time. > Do you not search for lisp symbols? > > > If you search for "ptrdiff_t" or even "__attribute__", you get gobs of > > hits. > > And? Searching for "ptrdiff_t" just in the src directory brings more than 3500 hits. Does it sound like practical to you? Who'd be able to review such a voluminous output to find what you are after? > Now imagine if "ptrdiff_t" was called "function" instead. I don't really see the difference. Like I said: searching for symbols of a programming language is not a good idea. It is not efficient, and thus not useful. So this aspect is simply not relevant to the issue at hand. > > Same if you search for "defun" or "defmac". > > defun and defmacro are great symbol names. > Specific, unique and as a bonus short. Maybe if you search the text of a book, or sources of a program written in a language other than Lisp. Otherwise once again, you get gobs of hits that are not relevant to what you are looking for. So the point you are trying to make, namely, that bad names bring too many hits, is not convincing, because any symbol we choose will have the same problem. > > This is simply not a good idea, and the fact that we choose this or > > that name for a type declaration will never help you, as long as many > > instances use that declaration. > > The focus is "Declaring Lisp function types". If it had a good symbol > name, I could find relevant places without false positives. Both 'function' and 'type' (and several similar ones) are good symbol names for that. And if you disagree, let's agree to disagree, because it doesn't sound like there's a sign of any agreement or compromise in sight.