From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Declaring Lisp function types Date: Fri, 23 Feb 2024 17:35:12 -0600 Message-ID: <389657c1-3bc5-4577-82a1-df4244ed5d58@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15392"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: acorallo@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 24 00:36:40 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 1rdf5r-0003n5-NF for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Feb 2024 00:36:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdf4n-0002nV-89; Fri, 23 Feb 2024 18:35:34 -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 1rdf4c-0002mh-No for emacs-devel@gnu.org; Fri, 23 Feb 2024 18:35:28 -0500 Original-Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdf4Y-0001Kd-Te; Fri, 23 Feb 2024 18:35:22 -0500 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 73E5F763197; Fri, 23 Feb 2024 23:35:14 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a286.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1031F760CC6; Fri, 23 Feb 2024 23:35:14 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1708731314; a=rsa-sha256; cv=none; b=hCA00Mi9zFqLG9WF8waiY89I0zPBcRF9zhX7vK0uLd94GVfRQT8IONwIOebhhT4q+Oh5k4 ER+MSDMysxMkjUPSyWEEL/fPgWB9ZONJixjAsVdgatyldYjwTZtOPRGhIojB12MhyoJH38 px94twfxNPONmM2jCPGUJgUP5uM8W8vuMpw4izNw4ZCX81EmQxBTOFmM659PutqpTgPPm+ TMQHfXSesFxuAjxQKDmOfOhwVIIBgSqmn3l0t2/NPpgedi21QDd3C5w97CzkVrPJ/jj+8p UOcI350RWj1yQt1yywoYVYovdk7twIc28NJ0BNWkAodfqNJRG7RLBvH1PXiyOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1708731314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=A1ipSW4yTO7ggzambrxz+27qjDWuASeNg/Pd08qzDBQ=; b=Lmhu2nYE/3fDXz2z8JpiC1jmiQJ7X4hjybanagVGFe3P6qkXf0hYrPBbbZxNzTEgNbCKPx ldIK9WMsyFdbHI0cewWRvXBFJNpbiaEKS2tYbi7ZJiMzQmK2VvabaGjGpX/HUwCIMn5uzF 5h9++79AfqpIiQByFDtOhJyGdvDMeyvIGa7Lp0fXoV0VYKNzj+XpfbZoHveLmM7GHkBELT 52f12oON7EWEcgpQme0guR9OXepRg4gMiG3Q4+BG72iiL+6A8+n402PSy+5jazc+hLS9FE UDn8EUv2vitZoaDy3fyOEr3H2tzbMAQgUyCQJhbErTIqPwcpJ7gNygpj6oi0iw== ARC-Authentication-Results: i=1; rspamd-55b4bfd7cb-jlpd4; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Tart-Stretch: 5c53b6776e423c0d_1708731314294_1504783468 X-MC-Loop-Signature: 1708731314294:217107004 X-MC-Ingress-Time: 1708731314294 Original-Received: from pdx1-sub0-mail-a286.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.112.142.233 (trex/6.9.2); Fri, 23 Feb 2024 23:35:14 +0000 Original-Received: from [10.43.0.210] (unknown [193.56.116.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a286.dreamhost.com (Postfix) with ESMTPSA id 4ThRFY4QQrz11; Fri, 23 Feb 2024 15:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1708731313; bh=A1ipSW4yTO7ggzambrxz+27qjDWuASeNg/Pd08qzDBQ=; h=Date:To:Cc:Subject:From:Content-Type:Content-Transfer-Encoding; b=TM9Km4Gf1GqngpTfjgcbfB2KB+NEhSNxCJZXr3Q/bUeYRvbsyUv41w54NxxlJG8cl Wfarv0MvBqHhj0qxrr7x/1S47m+Yw/6/ib2UduAMTA93gypKo2oKS/RlkiviX6Gglt gwA7LiHVdA2Xlz/XMmb2TqrGly3i1rsOnXq15IPeXeRWVtDYNOEQQBv/J1PC59gUnG DYM0U/w6rgqvxjfgZSeow6sS3bXalZe/hUP83p9TfzbX8t/i9rsf/6mSCf4pMhNpuW g3dHKp76FIkovCAzBOAF1zSJQDqBIyOStw5QO9h9mkhxPc5kcp3FzmJmJpeKJUShno lrMtWyH4kaitA== Content-Language: en-US In-Reply-To: Received-SPF: neutral client-ip=23.83.212.17; envelope-from=adam@alphapapa.net; helo=bird.elm.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:316478 Archived-At: Hi Andrea, > Finally on top of 'scratch/func-type-decls' (where I there was already a > similar work for primitives) I pushed some commits that allows for the > following style: > > (defun sum (a b) > (declare (function (integer integer) integer)) > (+ a b)) > > I moved all function declaration out of 'comp-known-type-specifiers' and > everything looks functional now. > > Before writing a ton of changelogs I thought was good to get some > feedback anyway. WDYT? 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. Thanks for your work on these features! --Adam