[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: What's missing in ELisp that makes people want to u
From: |
Drew Adams |
Subject: |
RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib? |
Date: |
Sun, 12 Nov 2023 19:45:13 +0000 |
> 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)
>
> or this:
>
> (cl-loop for i = 0 then (+ i (if (eq (nth i list) ?\\) 4 1))
> for var = (nth i list)
> while (< i size)
> if (eq var ?\\)
> collect (string-to-number
> (concat (cl-subseq list (+ i 1) (+ i 4))) 8)
> else
> collect var))
>
> or this:
>
> (cl-loop
> named loop
> with above
> for lane in (comp-cstr-ctxt-typeof-types comp-ctxt)
> do (let ((x (memq type lane)))
> (cond
> ((null x) nil)
> ((eq x lane) (cl-return-from loop x)) ;A base type: easy case.
> (t (setq above
> (if above (comp--intersection x above) x)))))
> finally return above))
>
> It isn't an accident that the reference documentation of cl-loop in
> cl.info takes a whopping 700(!) lines.
FWIW:
"Don't Loop, Iterate":
https://iterate.common-lisp.dev/doc/Don_0027t-Loop-Iterate.html
"The Iterate Manual":
https://iterate.common-lisp.dev/iterate-manual.pdf
- Re: What's missing in ELisp that makes people want to use cl-lib?, (continued)
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Michael Heerdegen, 2023/11/13
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/13
- Re: What's missing in ELisp that makes people want to use cl-lib?, Michael Heerdegen, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/15
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, Richard Stallman, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/12
- RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib?,
Drew Adams <=
- Re: What's missing in ELisp that makes people want to use cl-lib?, Richard Stallman, 2023/11/13
- RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib?, Drew Adams, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Tomas Hlavaty, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/14
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/14