Hi pardon me, but grep type.... would yield many more hits, and I do not understand why this is relevant to the issue. The points are two: (1) gratuitous difference from Common Lisp (*) and (2) potential issues with down the road useful and rather obvious uses of declare forms (cfr., the let example). Granted (1) can be "documented away", by saying that type declarations at the top level are "special", but (2) should be taken into consideration. Having said that, I think that signature or funsig or something other than type, conveying the actual meaning of that specific declaration would be better. Or this could be dealt with as in (defun *foo* (x) (declare (*ftype* (function (integer) float) *foo*)) (+ x 42.0)) IMHO, it makes more sense to the Common Lisper. After all, ELisp is a 2-Lisp. All the best MA On Tue, May 7, 2024 at 6:55 PM Tomas Hlavaty wrote: > On Tue 07 May 2024 at 13:55, Marco Antoniotti > wrote: > > IMHO (and, I am not afraid to say, of many common lispers) this is > > shortsighted and a rather gratuitous departure from what CL does. With > > some potential unintended consequences down the road. > > There was a discussion about this. > > id:yp15xyf88yb.fsf@fencepost.gnu.org > Andrea Corallo (February 23) () > Subject: Declaring Lisp function types > To: emacs-devel@gnu.org > Date: Fri, 23 Feb 2024 11:02:52 -0500 > > also > > id:jwv4jdne65n.fsf-monnier+emacs@gnu.org > Stefan Monnier (March 03) () > Subject: Re: Declaring Lisp function types > To: Andrea Corallo > Cc: "Stefan Monnier via Emacs development discussions." < > emacs-devel@gnu.org> > Date: Sun, 03 Mar 2024 09:52:23 -0500 > [...] > Then I'd go with > (declare (type (function ..))) > [...] > > > (defun foo (x) > > *(declare (signature (function (integer) float))* > > (+ x 42.0)) > > grep signature ~/mr/emacs would yield lots of false positives > > function-signature or something like that would be better name. > but this was also discussed already. > -- Marco Antoniotti, Professor tel. +39 - 02 64 48 79 01 DISCo, University of Milan-Bicocca U14 2043 http://dcb.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY