all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Robin Tarsiger <rtt@dasyatidae.com>
Cc: Emacs-Devel List <emacs-devel@gnu.org>
Subject: Re: cl-block less lexical than expected
Date: Thu, 30 Dec 2021 13:50:43 -0500	[thread overview]
Message-ID: <jwvee5u3p6n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <78900c46-4c9a-b690-95d3-a02f27be9e59@dasyatidae.com> (Robin Tarsiger's message of "Thu, 30 Dec 2021 12:12:52 -0600")

> 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




  parent reply	other threads:[~2021-12-30 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30 18:12 cl-block less lexical than expected Robin Tarsiger
2021-12-30 18:15 ` Robin Tarsiger
2021-12-30 18:50 ` Stefan Monnier [this message]
2022-01-04 19:29   ` Robin Tarsiger
2022-01-04 20:11     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvee5u3p6n.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rtt@dasyatidae.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.