[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-lib warnings
From: |
Stefan Monnier |
Subject: |
Re: cl-lib warnings |
Date: |
Sat, 24 Dec 2022 20:21:24 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> I find it very interesting how many Emacs Lisp programmers want to use a
> highly functional, Scheme-inspired style -- e.g. the recommendation in
> this thread to use named-let -- despite how the roots of Emacs Lisp are
> highly imperative.
What can I say, I'm a pure functional programmer at heart (my own
experimental language is pure, statically (and dependently) typed, and
strongly normalizing).
FWIW, if you use `named-let` consciously/carefully enough (i.e. so all
the "recursive" calls are in tail position) the resulting code is
a plain old imperative `while` loop using `setq` to update
iteration variables.
That's actually the main problem with `named-let`: it's a bit too easy to
use non-tail-recursive calls, which are not only more costly but eat up
the stack. Maybe we should have a version of it that signals an error
if there are non-tail-recursive calls.
Stefan
- Re: cl-lib warnings, (continued)
- Re: cl-lib warnings, João Távora, 2022/12/23
- Re: cl-lib warnings, Philip Kaludercic, 2022/12/24
- Re: cl-lib warnings, João Távora, 2022/12/24
- cl-loop and plists vs alists, Philip Kaludercic, 2022/12/25
- Re: cl-loop and plists vs alists, João Távora, 2022/12/25
- Re: cl-lib warnings, Sean Whitton, 2022/12/24
- Re: cl-lib warnings,
Stefan Monnier <=
- package-initialize was Re: cl-lib warnings, T.V Raman, 2022/12/24
- Re: package-initialize was Re: cl-lib warnings, T.V Raman, 2022/12/24
- Re: package-initialize was Re: cl-lib warnings, Stefan Monnier, 2022/12/25
- Re: package-initialize was Re: cl-lib warnings, T.V Raman, 2022/12/25
- Re: cl-lib warnings, tomas, 2022/12/25
- Re: cl-lib warnings, João Távora, 2022/12/25
- Re: cl-lib warnings, tomas, 2022/12/25
- Re: cl-lib warnings, Sean Whitton, 2022/12/25
- Re: cl-lib warnings, Eli Zaretskii, 2022/12/24
- Re: cl-lib warnings, Dmitry Gutov, 2022/12/24