emacs-devel
[Top][All Lists]
Advanced

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

Re: master f225011: ibuffer-do-isearch: don't depend on `cl-values-list'


From: Juanma Barranquero
Subject: Re: master f225011: ibuffer-do-isearch: don't depend on `cl-values-list' (bug#38430)
Date: Mon, 2 Dec 2019 03:20:31 +0100

On Mon, Dec 2, 2019 at 2:55 AM Stefan Monnier <address@hidden> wrote:

> I must admit I'm biased: I find c-lib's multiple-value support to be
> completely worthless.  I don't know anything you can do with that you
> can't do just as easily without it.  IOW it only makes sense as
> a "compatibility with Common-Lisp", yet it doesn't provide the right
> semantics either so it doesn't work for that either.
>
> I regret not having noticed it back in Emacs-24 time when I could have
> marked those functions as obsolete (or even kept them in cl.el but not
> in cl-lib.el).

I think we should mark them as obsolete and work to remove them some day.
They add clutter with no real benefit. It's silly to have compatibility
with such a feature while we aren't compatible with other useful features
of Common Lisp, like namespaces (I mean, "packages") or format.

> I consider the patch you showed as broken (regardless of whether it
> does work in practice, obviously).  Require cl-lib is another way to fix
> this, if you want a less intrusive patch.

I've commited a fix with cl-destructuring-bind. This is a case where cl
functions (cl-multiple-value-bind and cl-values-list) didn't add anything
of value (no pun intended).

Once we branch, we could perhaps try using more cl and not less. Not just
in that case, but using cl functions instead of reimplementing them here
and there.

I mean,

  (ibuffer-remove-alist 'key alist) == (cl-remove 'key alist :key #'car)

and ibuffer-remove-duplicates is just a reimplementation of
cl-remove-duplicates, without the bells and whistles.

*But*, I think we should have in place a definite policy about cl-lib.


reply via email to

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