[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] Want to submit two packages "ilist" and "blist"
From: |
Adam Porter |
Subject: |
Re: [ELPA] Want to submit two packages "ilist" and "blist" |
Date: |
Sun, 19 Sep 2021 11:43:53 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Durand <mmemmew@gmail.com> writes:
> The two packages can be found via the following links:
>
> <https://gitlab.com/mmemmew/ilist/>
> <https://gitlab.com/mmemmew/blist/>
By the way, I see in ilist.el this comment:
;; This is similar to using `cl-defstruct', but this struct is so
;; simple that depending on the cl library seems unnecessary to me.
You may not know that `cl' has been part of Emacs for over 30 years.
It's curious why some users seem to have an aversion to it. Somehow
there's this persistent myth that using it in a library would be not
minimalistic enough, yet cl-lib is used by Emacs's own code, so it's
loaded anyway, and its code is standard and reliable.
So rather than defining a number of aliases for a bespoke list format
like:
;;;; column accessors
(defalias 'ilist-column-name 'car
"Return the NAME of COLUMN.
\(fn COLUMN)")
(defalias 'ilist-column-fun 'cadr
"Return the FUN in COLUMN.
\(fn COLUMN)")
(defalias 'ilist-column-min 'caddr
"Return the MIN in COLUMN.
\(fn COLUMN)")
(defalias 'ilist-column-max 'cadddr
"Return the MAX in COLUMN.
\(fn COLUMN)")
;; Unfortunately (or not) there is no caddddr and cadddddr.
(defun ilist-column-align (column)
"Return the ALIGN in COLUMN."
(nth 4 column))
(defun ilist-column-elide (column)
"Return the ELIDE in COLUMN."
(nth 5 column))
It would be much more efficient and simple to just use cl-defstruct.
Re: [ELPA] Want to submit two packages "ilist" and "blist", Richard Stallman, 2021/09/20