Subject: Re: bug#59333: [PATCH] Define macro dlet*

From: Jean Louis <[email-masked]>
Date: Sat, 19 Nov 2022 07:37:31 +0300

* Daan Ro <[email-masked]> [2022-11-17 10:42]:
> > dlet was new in Emacs 28, and the change you mention was done before
> > Emacs 28 was released.  So NEWS just mentions the introduction of
> > dlet, and that is enough.
> 
> Sorry it was my fault for not paying attention to the commit year (I thought
> that was August this year).
> 
> Therefore reverting it now must not be an option.
> 
> But I think let* is more useful than let in general for programming,
> as it let us create successive bindings and transform the flow of
> data, like the natural flow of thought.

In some cases I use `dlet' within my 'let*' to make certain
variables to be global as those variables are not found in the
main code, but in the external text. Those two functions are not
interchangeable for me. Replacing them does not work.

Example is below:

(let* ((text (rcd-dlet ((hs::id id)
			(hs::uuid (hyperscope-uuid id))) 
	       (rcd-template-eval text '("⟦" "⟧")))))
  (continue...))

There are three parts: main code, template and text. Main code
does the template interpolation by using text.

As text is separate from code and from the template, the main
code cannot know what exactly is evaluated during template
interpolation. Thus using lexical binding does not work well with
externally evaluated code.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/