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 09:10:32 +0200 Message-ID: <86v86ez6af.fsf@gnu.org> References: <389657c1-3bc5-4577-82a1-df4244ed5d58@alphapapa.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8208"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, 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 08:11:28 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 1rdmC0-00021g-8b for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Feb 2024 08:11:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdmBB-0003sk-46; Sat, 24 Feb 2024 02:10:37 -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 1rdmB9-0003sM-7s for emacs-devel@gnu.org; Sat, 24 Feb 2024 02:10:35 -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 1rdmB8-0002mi-Qx; Sat, 24 Feb 2024 02:10:34 -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=B0LB0Yki0bYebr0/VfnQKNhlEz/Kk4QZyeqPjsHPetI=; b=AGW4NeLu/YiE DUtFbpjOVkexDvXupX/06/SjGLE8DmSNVm+kGInH2vKYPgCQFhDrUN1I9B6cLsl07gb3CTKnUG8uK Xf4ZVCBcE6zv9qE8bM/MKV0qR9aNBuBtk7nDlTdvpt61p82GSi6mAP6wiFJdcg95oXEd17xIUMMGm vrQaQFND8nFdoWVN1OBRrD+7aRwTSn6Wui6ZVKpnbM+lapPUmefVbBNYaZl1Y6NrCITHTJ4f9fpau EDxqzKXRFTcYiy7w9BcGKu+5kIo5/7BUz3FtuAAvQ35qq8PpM2qf5SK86xSGOFMFdhqMVd11he6/b 82HBPpA0UNIdL5PNXGd28g==; In-Reply-To: <389657c1-3bc5-4577-82a1-df4244ed5d58@alphapapa.net> (message from Adam Porter on Fri, 23 Feb 2024 17:35:12 -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:316480 Archived-At: > Date: Fri, 23 Feb 2024 17:35:12 -0600 > Cc: 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.