GNU bug report logs - #66940
Dynamic scoping is all weird now?

Previous Next

Package: emacs;

Reported by: Dave Goel <deego3 <at> gmail.com>

Date: Sun, 5 Nov 2023 04:08:02 UTC

Severity: normal

Tags: notabug

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dave Goel <deego3 <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>, 66940-done <at> debbugs.gnu.org
Subject: bug#66940: Dynamic scoping is all weird now?
Date: Tue, 7 Nov 2023 22:21:25 -0500
[Message part 1 (text/plain, inline)]
Most absolutely, and of course.
I was just trying macros here to improve my understanding.
Which it happened, thanks to all y'all's excellent explanations.


On Tue, Nov 7, 2023 at 10:07 PM Michael Heerdegen <michael_heerdegen <at> web.de>
wrote:

> Dave Goel <deego3 <at> gmail.com> writes:
>
> > Thank you
>
> Then let's close this one.
>
> What I still wanted to say (to you): no need to complicate things using
> macros here in your example.  Use functions, then variable references
> are simple and clear.
>
> If a macro (expansion) needs to refer to run-time values, use macro
> arguments to pass an appropriate expression (like a variable).
>
> But this is overkill in your case, no macros needed.  The purpose of
> Lisp macros is to extend the language and/or rewrite code (at compile
> time).  More or less, only that.  Always think twice if you really need
> macros, try to avoid using macros when possible.  This will make the
> code easier to understand and maintain.  Only if a macro introduces an
> abstraction that makes the code actually easier to understand justifies
> using one.
>
> Michael.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.