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, 24 Feb 2024 12:03:55 +0200 Message-ID: <86edd2yy9g.fsf@gnu.org> References: <86v86ez6af.fsf@gnu.org> <3cc20ab3-fee7-4b96-9296-604239d761ad@alphapapa.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18425"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, adam@alphapapa.net, emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 24 11:05:02 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 1rdotw-0004VA-R8 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Feb 2024 11:05:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdosy-0000Sy-N9; Sat, 24 Feb 2024 05:04:00 -0500 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 1rdosw-0000SN-PP for emacs-devel@gnu.org; Sat, 24 Feb 2024 05:03:58 -0500 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 1rdosw-00052j-CJ; Sat, 24 Feb 2024 05:03:58 -0500 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=Z3k4VOZL8wVAX2yEtFnzhOEoDLPwmgic1QyYzoWdceo=; b=ZF1bcFhgJ71V 3d2eFV/m1wr3GQSwmddlp5Rn1Qpsnwz4iar6EZIEXiAdzKvSRz8HsHYn6g42kdJicaaxLgNVr5Np3 +7jatjlLxOr+7dHjFrURNF/6I19ovMGmDJKKFA+x4TB5CZcR2W0rIuFc0Ywn+6Ua6n2UCdFcp+21j XTVfmY8eQwnnilv+LkBO0mOr2uaNzfBIYKr0zCWkkZyp9LzW2MdbNHuwn1XAGrKVfGahdEUw6GJwO v0hNS6rXkhR32BMv8hv9Yf9le+AcT15F7OSx7y6HYi6eJcHE2DgKR27GF5Uv73Dp6yhz/qQFFNwl0 VvLktdcYaUv+7vliLAjJ1Q==; In-Reply-To: <3cc20ab3-fee7-4b96-9296-604239d761ad@alphapapa.net> (message from Adam Porter on Sat, 24 Feb 2024 02:56:14 -0600) 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:316487 Archived-At: > Date: Sat, 24 Feb 2024 02:56:14 -0600 > Cc: acorallo@gnu.org, adam@alphapapa.net, emacs-devel@gnu.org > From: Adam Porter > > >> That looks nice to me. My only suggestion would be to change the symbol > >> `function` to `type`, i.e. > >> > >> (defun sum (a b) > >> (declare (type (integer integer) integer)) > >> (+ a b)) > >> > >> Because it would be more concise and descriptive. > > > > FWIW, Andrea's proposal looks more descriptive to me. "Type" is too > > general, whereas "function" is more specific. > > I don't understand what you mean. ISTM that "type" is exactly what's > being declared Yes, but type of what? If you were to suggest function-type or function-signature or something with "function" in its name, I'd like it better.