emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using finalizers


From: LdBeth
Subject: Re: using finalizers
Date: Fri, 31 Dec 2021 12:43:06 +0800
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-apple-darwin18.7.0) MULE/6.0 (HANACHIRUSATO)

>>>>> In <tencent_4CC28DA9FBCB31B64701835E87D4CAFF4F05@qq.com> 
>>>>>   LdBeth <andpuke@foxmail.com> wrote:
>>>>> In <jwv35m94fqf.fsf-monnier+emacs@gnu.org> 
>>>>>   Stefan Monnier <monnier@iro.umontreal.ca> wrote:
ldb> There's nothing wrong with the behavior of `make-finalizer`, it just
ldb> treats a symbol as a function specifier, just like elisp does not
ldb> doing anything to prevent a user from `fset' symbol `nil' and
ldb> `(funcall nil)'.

Allow me to make a correction: Emacs 27 would report a error when
`(fset nil (lambda () 1))', but some Common Lisps would allow that,
and `(fset t (lambda () 1))' works in Elisp.

I guess it's because of the difference in some implementation details.
While `(symbolp nil) => t', `nil' is actually a constant stands for
"empty list" that doesn't have the corresponding definition slots.

But still, I think the behavior of `make-finalizer' doesn't need a fix.

-- 
LDB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]