[Top][All Lists]

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

Re: dolist considered harmful

From: Jay Kamat
Subject: Re: dolist considered harmful
Date: Tue, 30 Oct 2018 16:24:10 -0700
User-agent: mu4e 1.1.0; emacs 26.1

Stefan Monnier writes:

> Since it can only be used when we're 100% sure that LIST is a LIST,
> (and who can be sure of such a thing in a dynamic language like Emacs
> Lisp), I think we'd be better off deprecating it and changing all uses
> of dolist with a clear while+cdr loop that everyone can understand.

I haven't been following the other discussion, but I think deprecating dolist
is a little extreme. I use dolist a lot because it makes a lot of things I
write a lot simpler (over using the loop macro or mapcar).

I suspect a lot of existing code out there uses dolist, a github search
suggests about 500k uses (although many of those are probably copies).

reply via email to

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