[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: Printing alist pairs to a dedicated buffur
From: |
Emanuel Berg |
Subject: |
Re: [External] : Re: Printing alist pairs to a dedicated buffur |
Date: |
Fri, 26 Apr 2024 00:43:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Heime wrote:
>> 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 is very possible without dynamic/special variables. One can
use for example lexical let-closures:
;;; -*- lexical-binding: t -*-
(let ((clist '#1=(1 2 3 4 5 6 . #1#)))
(defun next-six ()
(unless (special-variable-p 'clist)
(pop clist) )))
(declare-function next-six nil) ; for the byte compiler not to complain
;; (next-six)
As you see, the variable can be used just as a global variable
but is in fact not dynamic/special.
There are options and maybe some other use cases for
dynamic/special global variables but in general code
absolutely not have to rely on global variables, be them
dynamic/special or static/lexical in scope.
--
underground experts united
https://dataswamp.org/~incal
- Re: Printing alist pairs to a dedicated buffur, (continued)
- Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/19
- Re: Printing alist pairs to a dedicated buffur, Manuel Giraud, 2024/04/20
- Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/20
- Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/20
- Re: Printing alist pairs to a dedicated buffur, Yuri Khan, 2024/04/20
- Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/25
- Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/25
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur,
Emanuel Berg <=
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/26
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Yuri Khan, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/27
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26