help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: [External] : Re: Printing alist pairs to a dedicated buffur


From: Heime
Subject: RE: [External] : Re: Printing alist pairs to a dedicated buffur
Date: Thu, 25 Apr 2024 16:18:51 +0000




On Friday, April 26th, 2024 at 3:55 AM, Drew Adams <drew.adams@oracle.com> 
wrote:

> > Don't use `defvar' if it can be avoided
> > as that creates global dynamic/special
> > variables,
> 
> 
> By that logic, don't use defun because
> it creates global dynamic functions.
> 
> Or defadvice or defalias or defcustom
> or defconst or defface or defgeneric or
> defgroup or defmacro or defmethod or
> defstruct or deftheme or ... They all
> create global, dynamic bindings.
 
> Try to use Emacs (or Haskell or ...
> pretty much anything else, for that
> matter) without using global, dynamic
> bindings. Then tell us about your
> adventure. ;-)

So why make such comments to others ?  It is not amusing at all.
 
> It can be "avoided" entirely. But no
> one does so.
> 
> > `setq' creates global static/lexical variables
> 
> 
> Not true.
> 
> This is what CLTL2 says about setq in Common
> Lisp, which uses lexical binding by default,
> for variables:
> 
> "The variables are represented as symbols,
> of course, and are interpreted as
> referring to static or dynamic instances
> according to the usual rules. Therefore
> setq may be used for assignment of both
> lexical and special variables."
> 
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node79.html
> 
> And Elisp isn't even "as lexical" as Common
> Lisp yet. As (elisp) "Scoping Rules for
> Variable Bindings" says:
> 
> "By default, the local bindings that Emacs
> creates are "dynamic bindings".
> ...
> The dynamic binding was (and still is)
> the default in Emacs for many years, but
> lately Emacs is moving towards using
> lexical binding in more and more places,
> with the goal of eventually making that
> the default."
> 
> IOW, Elisp hopes to eventually do what Common
> Lisp does - and has done - for 40 years.



reply via email to

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