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:30:42 +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 <jwv35m94fqf.fsf-monnier+emacs@gnu.org> 
>>>>>   Stefan Monnier <monnier@iro.umontreal.ca> 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



reply via email to

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