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

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

RE: How to avoid compiler warning `unused lexical variable' for `dolist'


From: Drew Adams
Subject: RE: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?
Date: Fri, 8 Jan 2021 09:22:51 -0800 (PST)

> FWIW, I remember that I used to like `do*` back when I was programming
> in Common Lisp, but nowadays I find it rather inscrutable.

I agree with your last phrase, and I was never a fan of `do*'.

> In that category I think Scheme's named let is infinitely superior: both
> more general and easier to understand.  Too bad that it's kind of a pain
> to implement efficiently in ELisp, but Vincent's `recur-let` gives
> a pretty good approximation (still more general and easier to understand
> than `do*`).
> (c.f.
> https://urldefense.com/v3/__https://github.com/VincentToups/recur__;!!GqivPVa
> 7Brio!LHaFHC2fIL6O-KnVleahtiHtmmkLRwamJMjoe9mglmjt2ncWgr0mSNs9uMVnhdAd$ ).

Sure.  It can be useful to move recursion to iteration
under the covers, or even above the covers through the
idiom of using an accumulator.

Elisp has a long way to go, in terms of doing such
things under the covers.  Put differently, doing such
things is not something new in software engineering.

I guess Elisp hasn't had the necessary itch-scratchers
or the felt need.  For much (most?) user use of Elisp,
performance isn't particularly important.  The story
is different for other Lisps, like Common Lisp, which
have more general use.

> > There's nothing particularly odd, new, or unlispy
> > about such design. It's very old in Lisp iteration.
> 
> Old doesn't mean good.

Right. Nor does new. Or young.

There's still room for Elisp to learn from Common Lisp
(and, as you point out, from elsewhere).



reply via email to

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