From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: LdBeth Newsgroups: gmane.emacs.devel Subject: Re: using finalizers Date: Fri, 31 Dec 2021 12:30:42 +0800 Message-ID: References: <878rw1pvcw.fsf@logand.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15836"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-apple-darwin18.7.0) MULE/6.0 (HANACHIRUSATO) Cc: LdBeth , Tomas Hlavaty , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 31 05:34:19 2021 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 1n39cQ-0003uF-Ih for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 05:34:18 +0100 Original-Received: from localhost ([::1]:60714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n39cP-0003m1-FT for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Dec 2021 23:34:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n39ZN-0000WD-Eg for emacs-devel@gnu.org; Thu, 30 Dec 2021 23:31:09 -0500 Original-Received: from out203-205-221-233.mail.qq.com ([203.205.221.233]:52576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n39ZC-0002hs-Ki for emacs-devel@gnu.org; Thu, 30 Dec 2021 23:31:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1640925046; bh=DetVQZyl3g4RC62aLfzXnaGbEZyEhvD495knUG6qvd8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=zSZdcZWdMD+xXjEtVREBdz3KqhI/B7omvNKdSAtnsnQzq32suckeW2gS95CO64e6C ox5/3VsSNc5iQLtoVia7z/ByV+zJ2LiHLerxZjJjy8ICVNtAB03wpVJ9gbQQ+ZZIc1 jclPzithsLP6jDPtGpauIDcJHs+qVblZ+SoAbHdw= Original-Received: from Costume-Party.local ([61.174.174.112]) by newxmesmtplogicsvrsza9.qq.com (NewEsmtp) with SMTP id 7AD05C39; Fri, 31 Dec 2021 12:30:45 +0800 X-QQ-mid: xmsmtpt1640925045tx8zgje9z X-QQ-XMAILINFO: OW4JKxETGMY2bWmUj0US5KoSnxtSwNwRXBv2vIeowMScSyHf0BtvpIryzhnFuU ozy5zxyi1gEZOv9T54fltnHAF+i+tJMkcvthqw5kKyUM+UGHCB6IPA9uNqkBeIDVHc/A1swgolPs Di39ocL3OjyoDGT5753AaUC/21v3V8WmGgKamfphWgaofUVXp82crw2n9ED221IfoRpDe7lVFLrd gELwF9K5++HAeEtezABWzTIPb3KW6a+B81lNoiQ94K25bBlGgPAKZBlpy/ltrqkJ/9AomwEOcAcz AAbmIlPk8que9vw3AugyR9I/DQHSkPPHDsi+hpJccprc+eQ9k+5x1QvsFM+mQhqcgWu97MHq3bVF wWOITJQU0CjE+sDTXWCfCnI/byGZC6/RFDlAUTFnLbjjblusqMANXiNIxY0r5xQdqysDi3hkdzml DjOHLVxL7KapT7PXz20CDvJxUHP1MLAp5Fb2RjnU3LzfNFRWkv9AD7rH63AW1Po5LE1AZZZgez8L 4eVQw+FiFsqA1ZxAtp8DystifEGQeJiFuwZpqW4zbWODyuQSjk/NmekQAqwhFEs4mU8joLg2jOT5 ulpwQgsPFt8JKRCNBItnYFveI4/KeAqtnECGhDV9bZkenXipnDRQ6X0PCpZ2LMqrubI2aAP3fDu/ E/26ldUoT//yqoB5WbXMJ0H+9GzI4QKzY/PyLgjhPmgJ71cFly3bRF/l1uKmv1Os2TIKXV12DrLp Kes5koVTpGh67igNSYZWXTgIbB9raYK0o0Y/u0/4PJu3z/5g1ADheA1CEdADNehXww4gIWV9O++w EI5hE6dYtQRINX/42PPS8YbLuWPe83zxwYmmkouR Original-Received: by Costume-Party.local (Postfix, from userid 501) id 12994203D62C81; Fri, 31 Dec 2021 12:30:42 +0800 (CST) X-OQ-MSGID: In-Reply-To: X-Face: %[!P\u/BKFRGn_9h9|yO"ho?C0ej^LmM}WMb-`Jfj8OsS^^AKmHYGlD@^|7SEA3UzOGPFbB"OFczY?'\JtJ\lR'@&Y5j; s8{$&|3D>^i.U4l2h?1qpD.+{[$~j]vBeHZf^|BGyL8{/`4 X-Attribution: ldb Received-SPF: pass client-ip=203.205.221.233; envelope-from=andpuke@foxmail.com; helo=out203-205-221-233.mail.qq.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:283710 Archived-At: >>>>> In >>>>> Stefan Monnier wrote: Stefan> I don't think Scheme's `letrec` works any differently in this respect, Stefan> except that instead of nil, variables get a special "void like" value Stefan> before they're initialized. Right. With that "void" like value, a sane Scheme would probably signal error at runtime. The simple letrec subr.el macro does not do that check. Stefan> In the above code, the real bug I can see which we should fix is that Stefan> `make-finalizer` should signal an error if its arg is not a function. There's nothing wrong with the behavior of `make-finalizer`, it just treats a symbol as a function specifier, just like elisp does not doing anything to prevent a user from `fset' symbol `nil' and `(funcall nil)'. -- LDB