From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Distinguishing `consp` and `functionp` Date: Sun, 28 Jan 2024 09:56:25 +0800 Message-ID: <871qa2jk52.fsf@yahoo.com> 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="5855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 28 02:57:21 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 1rTuQC-0001K6-KH for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Jan 2024 02:57:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTuPZ-0003C5-K8; Sat, 27 Jan 2024 20:56:41 -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 1rTuPY-0003Bw-Mr for emacs-devel@gnu.org; Sat, 27 Jan 2024 20:56:40 -0500 Original-Received: from sonic301-30.consmr.mail.ne1.yahoo.com ([66.163.184.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTuPX-0002c3-4n for emacs-devel@gnu.org; Sat, 27 Jan 2024 20:56:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706406996; bh=oEkacmwbpB2QhulF1IrkCa71rvYum7U41yw2IOdLkoE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=b9PmrLmKWBxb66iv84j63Qgk2vl/WRhUAuPsMUU2gQnuxRAeF+zit9P7LENGKYePMAk0ATSJOqiUER3wVVH9V295zMMfn096qUxX2qY1XISDvW0hdKGk1WIPcA15dtYXMSk+kjbYU0l/e3gf1vU/QXS+PlNsMXy69S9jnPM73CoADdkBYE//AkMLNWFwg2hGLG56rXJRnmzCAAjQxbCllGS6QIbjNHa7T9Nuj6+PTI0GsEQCbu+DvQG/blYD1RYh3626MhNjy5sv6qrwqum/3mNDPEOovXaUIRYgwJrlFi4pRywZMJw/pIDrcvnIx6y/wize0jy8lwekkjp/QkvGNA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706406996; bh=wW/1ihsDAxBLRjjMMtrOaRnTTtAxcBwsDARmaob5ABq=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=aa74KUnrwH+78AsygY+6Sb7RWGGyWWmm04pboW6ZHXKsxRdtpYVJQJucyuQnpO2K+mghFfo1YlnK1Rj5R5HJwhnY3ycaZIMFXz3ryta2NB7tDIXHbaCtEeJYzW0/dN2TYop+TrcJY6u/3DK0zr03uLINN1lQD0BD7kXAOodRfo+G98BzHroZr0Ej+HkPf3UuWQhoQHa7LclGHO32mZD9Qkj4mCyJO//UHYQr3E7ta3ZG9VGi6P0vpt6frvL6uATjCTBJNE2/Ba6MPT5EuizoLC3giFmBlcBpFtr3fer3d2VmVNYuGo34Cm7blhQ82DZkLFgIT2qgmhuXkcerx5h8/w== X-YMail-OSG: X2R0G1sVM1kWl3cPI3FKeyLlB8w7.R1zMxcAPSdxOyP9Vet0N3YrSvAVnrX1TEc oQQBwOjqqiYBQGdbGMgYyxuX2DhsxOasfVpxllK4gcnWLZs8EqZeEfQ0JIYNPzPcl6yq9KmWekCO qz4ii.nO1YFD7rzx7vZNCEtMiwd2ivjR5dNi5TCFJocoMzKaLks3UG0ikwbMb9ict1UarFB5Px7L vAMTIu5BOnhmnjnH3wS9YJs0OvIaShI445N7E6dh4PVMvwlM0o5EbQUd2Xg7CkGU5oknqmwSexew b8j5Q.mV5g5r4TZF.MOmx_zKOZx7HZO3XpyPeeldAhEHw7l1Rq0PbFTtDZN8Svlz4UT24NpGrVpl AnzBPxh_uV5mTWgwuM8nswGqTnmQK8T9RPNXdHaWWomzg3lEnWsYJnDaz3GczFDsNdRRbHuJ5_3N tREak9e_ovYWde5d0kRQXdNK4sWPvoVZnK3kPvxKNYIw5ucX5o.cp1RnPkCyzKsotz2zajawZFQs 2azakBlay_oc4NG2idXONOGMLBPaScQkX2smsf3UQnb7KKtZoFPECSf3APSl53uUPQDuQRIchSlJ PfW3_9e4QW.s_rF69VFkhbAjDzg4AS29kFCZlU0grreHN2FOYPlaxLW4Su90A98q_d4L3XM_vT4v w0uikkyREBNGMFAG59.PWAx5jYi4ZErPIq7mVruYG5QQahCdEfGiVawqZ83FXuBqFQKn7VKRiVwK 5CsdyqHH4kfcs5rKjquxTDKrM0j2C3b7l9d.39XUQPifKJYsCaEhG4w9gp379tqnu9w9GSHeKRaQ SdSDKrx58LFF6bZMqouoIyClkgfhn72kju.gwk1qpw X-Sonic-MF: X-Sonic-ID: ebf9b324-b5d8-4dd7-bfaf-294345fdad0c Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sun, 28 Jan 2024 01:56:36 +0000 Original-Received: by hermes--production-sg3-6dc75bc8fb-xcqgp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b5d54c0ad498be4ff118faab2d68ac25; Sun, 28 Jan 2024 01:56:31 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Sat, 27 Jan 2024 09:41:48 -0500") X-Mailer: WebService/1.1.22046 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.199; envelope-from=luangruo@yahoo.com; helo=sonic301-30.consmr.mail.ne1.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, 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:315509 Archived-At: Stefan Monnier writes: > The print format will be a sticking point, I expect. > > 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 > > #f(interpreted-function ARGS BODYHASH) > > because I basically kept the same code as used for compiled functions > (obeying the same `cl-print-compiled` var) but we could make it look > more "normal", like: > > #f(lambda (x y) (message "%S" x) (+ x y)) I'm not so concerned with appearances, so there's no need to go out of one's way to retain a print representation similar to the old one. > [ or #f(=CE=BB (x y) (message "%S" x) (+ x y)) =F0=9F=99=82 ] You're killing me... :-)