emacs-devel
[Top][All Lists]
Advanced

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

Re: cl-lib warnings


From: Philip Kaludercic
Subject: Re: cl-lib warnings
Date: Sat, 24 Dec 2022 10:33:44 +0000

João Távora <joaotavora@gmail.com> writes:

> On Fri, Dec 23, 2022, 23:42 Yuan Fu <casouri@gmail.com> wrote:
>
>> Yes, cl-loop is one of the worst offenders in my eyes.  If I want to
>> > use Fortran or C, I will use Fortran or C; I don't want to see Fortran
>> > for-loops in Emacs Lisp.
>>
>> Darn it! I loved cl-loop :-) I’ll curb my use of cl-loop in Emacs codebase.
>>
>
> As a data point, some of us are, like you, highly appreciative of cl-loop,
> and cannot see anything remotely approaching its versatility in other
> programming languages. I don't know what its detractors recommend for
> iterating over a plist, to give just one example.

I would guess a custom function, say `plist-map' along the lines of
`maphash'.  I am kind of surprised to see that this doesn't exist, but
according to my intuition of property lists, they are not meant to be
iterated.

While writing this, I also just realise this exists in the "map"
package.

  (map-do (lambda (key val)
            (message "Key %s, Value %s" key val))
          '(:one 1 :two 2 :three 3))



reply via email to

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