emacs-devel
[Top][All Lists]
Advanced

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

Re: What's missing in ELisp that makes people want to use cl-lib?


From: Richard Stallman
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Tue, 02 Jan 2024 23:11:27 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Plesae forgive my delay in getting to this.

  > Btw, the above is a very simple use of cl-loop.  We have quite a few
  > of much more complex ones.  For example:

  >   (cl-loop
  >    with comp-ctxt = (make-comp-cstr-ctxt)
  >    with h = (make-hash-table :test #'eq)
  >    for (f type-spec) in comp-known-type-specifiers
  >    for cstr = (comp-type-spec-to-cstr type-spec)
  >    do (puthash f cstr h)
  >    finally return h)

  ...

  > It isn't an accident that the reference documentation of cl-loop in
  > cl.info takes a whopping 700(!) lines.

This suggests an idea to me:
we can define something in the byte compiler to distinguish simple
uses of cl-loop from non-simle ones, and warn about the latter.

The distinction could be a matter of whether it uses cl-loop features
that are less frequently used.  Or perhaps how MANY cl-loop features
are used.  (There is no need to try to make this precise or quibble
about the details.)

We could enable the warning for source files in the Emacs distribution.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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