From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.devel Subject: Re: Declaring Lisp function types Date: Sat, 16 Mar 2024 15:56:30 +0100 Message-ID: <87o7betech.fsf@neko.mail-host-address-is-not-set> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13256"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, emacs-devel@gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 16 15:57:31 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 1rlVTX-0003HT-3v for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Mar 2024 15:57:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlVSg-0003oG-6f; Sat, 16 Mar 2024 10:56:38 -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 1rlVSe-0003o8-IV for emacs-devel@gnu.org; Sat, 16 Mar 2024 10:56:36 -0400 Original-Received: from logand.com ([37.48.87.44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlVSd-0006z7-0C; Sat, 16 Mar 2024 10:56:36 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 87A0719E868; Sat, 16 Mar 2024 15:56:32 +0100 (CET) X-Mailer: emacs 28.2 (via feedmail 11-beta-1 I) In-Reply-To: <86sf0q5l0v.fsf@gnu.org> Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:317115 Archived-At: 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? Those are also reasonably good names. Now imagine if "ptrdiff_t" was called "function" instead. > Same if you search for "defun" or "defmac". defun and defmacro are great symbol names. Specific, unique and as a bonus short. > 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. >> In the context of "Declaring Lisp function types", grep gives too many >> false positives when searching for the symbol 'function' or 'type'. > > It will give too many hits no matter how we call it. The better name, the less false positives. > That's just sheer luck: not a lot of functions have these properties. The point is reducing false positives. > By contrast, _every_ function will have some type and some signature, > so you will have a gazillion of hits if you search for those, no > matter what its name. Every? What kind of lisp will elisp be? >> The symbol "function" already has specific meaning. Using it as a >> declare spec property name is just bad. For example, eldoc or M-. shows >> something unrelated to "Declaring Lisp function types". > > Some of these are irrelevant to the issue at hand, the others will > have to be adapted to the change, if we care enough. Why would anything have to be adapted? Why not simply use a better symbol name? > Sorry, you lost me here. How is this related to the issue discussed > in this thread? It shows how good symbol names help in various ways. It also shows how bad symbol names do not help. It shows that using the symbol name 'function' for "Declaring Lisp function types" is just bad.