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: Tue, 30 Apr 2024 17:55:23 +0300 Message-ID: <86mspaq4ro.fsf@gnu.org> References: <8634sdjgoj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19230"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefankangas@gmail.com, adam@alphapapa.net, monnier@iro.umontreal.ca, arthur.miller@live.com To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 30 16:56:15 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 1s1oty-0004nm-NF for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Apr 2024 16:56:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1otF-0002KO-0G; Tue, 30 Apr 2024 10:55:29 -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 1s1otD-0002HS-AK for emacs-devel@gnu.org; Tue, 30 Apr 2024 10:55:27 -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 1s1otC-0006CO-87; Tue, 30 Apr 2024 10:55:26 -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=W8RZSAMMyQb8Um5TRRMBhrn2okGJAlOCkjuMV9HQokQ=; b=SaBU/vuA7m3Z AfE1psBlp0Rkzs1vHwu9UcFnhmyU+JEHKmv44jJCZNdZ776WEzIotuJPOZLWG4NhPIVlHLU6kf9No 5yL+l/+G2Kcc+/gpwrvh1D2F/GsaDC84I+nCGigh+PVmpI47Xm9Zcxk6FuAh3d6EeJyhruqTYpQu7 3p26Lg7uldg7eIXMqATPKnC680D7LoONiD44oekzO2O4JpFl8iqmoRloX+bSpqB7pvrgxoXHfLgSJ 5On/lDAWBLVCimDDCSnNipqMAZ2wTI7A8TENj6H8r08Ot1qhkEF6xfg5umg6adB1ZkpgInJ26uC40 uWC9ksng8yWmQALn2GEsjQ==; In-Reply-To: (message from Andrea Corallo on Mon, 29 Apr 2024 13:48:01 -0400) 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:318438 Archived-At: > From: Andrea Corallo > Cc: emacs-devel@gnu.org, stefankangas@gmail.com, adam@alphapapa.net, > monnier@iro.umontreal.ca, arthur.miller@live.com > Date: Mon, 29 Apr 2024 13:48:01 -0400 > > Here we go, I pushed on 'scratch/lisp-func-type-decls' the > implementation of what we discussed with a doc entry. Any suggestion or > is it okay for master? I think you can land it on master, but please expand this terse description: @item (type @var{type}) Declare @var{type} to be the type of this function. This is used for documentation by @code{describe-function}. Also it can be used by the native compiler (@pxref{Native-Compilation}) for improving code generation and for deriving more precisely the type of other functions without type declaration. Without any discussion of what can be @var{type} and no examples, this is too abstract. I learned more about it from the other parts of the changeset, where you actually use this. So please say something about what can be @var{type}, and add one or two examples. Also, should we say something in NEWS about this?