emacs-devel
[Top][All Lists]
Advanced

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

Re: cl-block less lexical than expected


From: Stefan Monnier
Subject: Re: cl-block less lexical than expected
Date: Thu, 30 Dec 2021 13:50:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I have to think that since catch and throw both take evaluated
> expressions for their tags, a more suitable implementation might
> do a static transformation to choose an out-of-the-way lexical
> _variable_ name which would then be let-bound to a gensym during
> the body. cl-return-from could then try to evaluate the variable
> to get the tag;

Sounds good.  As you noted, this was not an option when these macros
were written because of the need for statically scoped variables.

> the warnings/errors for bad tags would be awkward to read, but at
> least the semantics would be correct.

By carefully choosing the names we use that shouldn't be too bad.


        Stefan




reply via email to

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