From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Distinguishing `consp` and `functionp` Date: Sun, 28 Jan 2024 12:55:06 -0800 Message-ID: References: <87o7d6kjfe.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20688"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier , Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 28 21:56:02 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 1rUCCA-0005AS-Ab for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Jan 2024 21:56:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUCBP-0002jA-Qd; Sun, 28 Jan 2024 15:55:15 -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 1rUCBM-0002gO-CR for emacs-devel@gnu.org; Sun, 28 Jan 2024 15:55:13 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUCBI-0008PI-Nm for emacs-devel@gnu.org; Sun, 28 Jan 2024 15:55:12 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-558f523c072so1881196a12.2 for ; Sun, 28 Jan 2024 12:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706475307; x=1707080107; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZCI4PXifUMEFU4Jp1lUSytOxwgZAgTRnwLHpihpUhBs=; b=IypbLL7yafJA/UwobnO4pFOwOiE1DfQTLb02zy2ZpL5iNine6RnJ4hdKSC/AAIAyMf PzT3kTD80r4OfVyulR9q/MhCfx4DN4kt5mUFo8cojlEE5CV77x2tyZoePBgUSkERcO6N H1lMK7g9dyvu+j0PORq1qvc2ehGEhZ9uInX8/jFW1RbXPyeXoAFBW4HKlItrVxWCa+Pa QdgOFKwKWiTcanW4wqEZ/aFnQDbkXrGpSc88Jx5/JefGJTMNnmjLVAh9663NmMCo/BWY 447U9IbEcfpszoBqKxEZSkKzNk0HA08zv1qCv0bwpRMGgzZpeCkp3sYEPDR6vYMjSzvm IXmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706475307; x=1707080107; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ZCI4PXifUMEFU4Jp1lUSytOxwgZAgTRnwLHpihpUhBs=; b=hvwLu2MtKCSoZvUv7KQ5+R03JHi5o20h+rSWVuOd8Ww/HQ2ii8FoqOrSLWyjdM/aVk XtRjoufm5cruhZUuyvGh2qNP94ZImx8lklGP1cQpWaye1HTuIq84JTN+/G2AKfFA3huP Dn8qz+07mQIGJQvL3wszo2BcNyNl6TLtceWcLrct7u17maasShkvGGdqE+fsSTrQjLuF ii0zTTe4SD/k1qsvJ9aq5erm0vZQtyE6+HkTTdQiUr9an1po0OVlTRpsp6M8/Tte1tqS 25P+rX6NeAvPs+yHm9H3yb5gmZ8fDjs1VFX6EYRPfJmYz0AasVfMtNKtXKjirJy9uWpL G88A== X-Gm-Message-State: AOJu0YzBerw2x+98HRlQyPyTVz5m9m6rOy1Kc3n+3I4BsXt1rxRtJS01 qFYDnADGXWdlpt+3ntg3KfRISq1uS3glPedNtdo21bLoci3jNmlafvqzN69jbS1PoWougKbXcDW mXqTi8/phKYlfygPx/wPZ4qidYu1N1CCCWOs= X-Google-Smtp-Source: AGHT+IErl+vxws9k25QBLI4hvSvFu1TlHWMPU/Ox45OmkOziLtXmSs0DgDM/FsA64QyUStEkLToqzDvgZDK7oFI7L0w= X-Received: by 2002:aa7:c312:0:b0:55e:eb91:bee4 with SMTP id l18-20020aa7c312000000b0055eeb91bee4mr1342835edq.29.1706475307088; Sun, 28 Jan 2024 12:55:07 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Jan 2024 12:55:06 -0800 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x534.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, 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-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:315571 Archived-At: Stefan Monnier writes: > Currently on `master` it typically does not look like what you show > above but like: > > (closure ENV (x y) (message "%S" x) (+ x y)) > or > (closure ENV (x y) DOCSTRING (interactive IFORM) (message "%S" x) (+ = x y)) > > For `prin1` with my PoC it currently looks like: > > #[(x y) ((message "%S" x) (+ x y)) ENV] > or > #[(x y) ((message "%S" x) (+ x y)) ENV nil DOCSTRING IFORM] > > and I'd rather not try to be too clever about it (it should be fairly > rare to use `prin1` on such things). For `cl-print` we (and users) can > choose, and I currently print it as FWIW, I like one aspect of the print format in SBCL, * (setq x (lambda () 1 2 3)) # namely that it explicitly says "function" rather than something like #f, which is more cryptic (and looks a bit too much like #f in Scheme, but that's just me perhaps). It'd be a bit more verbose, of course. > [ or #f(=CE=BB (x y) (message "%S" x) (+ x y)) =F0=9F=99=82 ] I'm obviously in favor of including a smiley in the print format, but only if the function makes you feel =F0=9F=A4=97