From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Distinguishing `consp` and `functionp` Date: Wed, 31 Jan 2024 00:40:41 +0000 Message-ID: References: <86msssble8.fsf@gnu.org> <86bk9448ai.fsf@gnu.org> <864jew40m3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003e96da0610332154" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36803"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 31 04:22:43 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 1rV1BS-0009GZ-Qf for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Jan 2024 04:22:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV1Ak-00040w-1N; Tue, 30 Jan 2024 22:21:58 -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 1rUyep-0006hH-Ev for emacs-devel@gnu.org; Tue, 30 Jan 2024 19:40:51 -0500 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUyen-00072y-R0 for emacs-devel@gnu.org; Tue, 30 Jan 2024 19:40:51 -0500 Original-Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-51120e2864fso939578e87.1 for ; Tue, 30 Jan 2024 16:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706661647; x=1707266447; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=77CbOQlhcqmKryq7JgHSRQj8YJsgkQixFsZ3SsN2xTw=; b=UDizZKLyF6VCl+IB+t2TL6E+5E+JmjCKg1yTz7bDqXhUrw1/6wJDYimMWrXsRkScXf JKaOIPzIi6JzGXtlQkyh8dJ6Ee+QlGZe4LETJ9Qcv5VPb42ASfUqQY3HLgRyoohsNEMv v8T+bTZ3dwtkMh6MlMBSC/miLMT7ZM8S8njouM0DrHoPQWXAwbVRzUaROnNP8vSBv+v+ QsrIfLjbd1VIwHugTSvDqh7Shzm9GyRe2yNHBuFWmSd0gPjBFRMFmeg065LFLHk0OJ7k fvor4I3yfmN8+jI/pyBAlS71PJmGPO2yXPwqXH3FHQk/Gl2mrf9NiBlmNdR9moM50ts6 BWEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706661647; x=1707266447; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=77CbOQlhcqmKryq7JgHSRQj8YJsgkQixFsZ3SsN2xTw=; b=vEvl3XtGSHP2vmfp0arrvc97cRVcy/dDoe5bxWmBugdtu//tVJuNPvhOXGcHKf5XBO v0GJwaW5wXrcFVez9Y2lAIfc+La+3sRi+lOFYJQ9YEAei7IjF+1M/ii7JPGTDoHKD+n1 acd4KmiY0qwMR2MyCqNHW7WU4OAUu8pNb46V2TUBaGS/mJSFvgG2qqovLPIDHqauBdpE fGWhQkWAAZJ96cG5mOzzEff0k77fd09uCGlzdh46t1u/oFhWr6q07VCs3r+gL3kNtlX3 gYsa0kd4YZwWMwuxXhfRR3WMDoD6x0FikhN6w2oF1dJ9B0+PbTuCmet/HCEHRp5cq06F 1/dw== X-Gm-Message-State: AOJu0YwTnWMYnqYi/UZ4KdZ/uFkTG+wI+to14JODdtitTyI3BVpC0IZo rmRffL49dxHxCPssJuFhLREBLoltctN0GvecMoBtvFpP5jtOr417++dCDj9tjVoJQT0Uhr9pdSP oRkndEXnDWro7INGRGusY7tdODxk= X-Google-Smtp-Source: AGHT+IGK42NQbH7X0bcr2v8a/DEQ6Ev78L3uH39RZPpmEuaggYVkth8xUkd9oforNidCIY1bFkSrFgzymrE8HnoLxms= X-Received: by 2002:ac2:5938:0:b0:511:d20:b609 with SMTP id v24-20020ac25938000000b005110d20b609mr129514lfi.46.1706661647389; Tue, 30 Jan 2024 16:40:47 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 30 Jan 2024 22:21:54 -0500 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:315651 Archived-At: --0000000000003e96da0610332154 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 12:22=E2=80=AFAM Stefan Monnier wrote: > I suspect that most cases will look like your Eglot example, where by > the time you get to the `funcall/functionp` the backtrace doesn't > immediately tell you where that function comes from ( Of course, not where the interpreted function comes from. But at least I'll know where to look, where to edebug. > Could be. That's one of the reasons why my patch doesn't change > `functionp` (yet). Yes, my advice is to keep it like that but add the warning (in funcall). > > Dunno. SBCL's compiler is pretty good, it propagates types and warns > > say, when using generic+ instead of must faster fixum+. > > Knowing "this is a function" isn't terribly better than "this is > either a function or a cons cell starting with `lambda`": it will rarely > let you turn a generic+ into a fixnum+. Isn't knowing "this is a function" a prerequisite for proving e.g. "this is a function returning a fixnum"? --0000000000003e96da0610332154 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Jan 31, 2024 at 12:22=E2=80=AFAM Stefan Monnie= r <monnier@iro.umontreal.ca<= /a>> wrote:

> I suspect that most cases will look like your Eg= lot example, where by
> the time you get to the `funcall/functionp` t= he backtrace doesn't
> immediately tell you where that function c= omes from (

Of course, not where the interpreted function comes from= .=C2=A0 But at least
I'll know where to look, where to edebug.
<= br>> Could be.=C2=A0 That's one of the reasons why my patch doesn= 9;t change
> `functionp` (yet).

Yes, my= advice is to keep it like that but add the warning (in funcall).
=
> > Dunno.=C2=A0 SBCL's compiler is pretty good, it propagate= s types =C2=A0and warns
> > say, when using generic+ instead of mu= st faster fixum+.
>
> Knowing "this is a function" is= n't terribly better than "this is
> either a function or a c= ons cell starting with `lambda`": it will rarely
> let you turn = a generic+ into a fixnum+.

Isn't knowing "this is a fu= nction" a prerequisite for proving e.g.
"this is a = function returning a fixnum"?

--0000000000003e96da0610332154--