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: João Távora
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Fri, 10 Nov 2023 14:18:18 +0000

On Fri, Nov 10, 2023 at 1:14 PM Po Lu <luangruo@yahoo.com> wrote:

> needless to say, never seen the code before in their lives, and will not
> so much as bat an eyelid before striking down code they cannot easily
> understand.

Wow, sounds like a fantastic healthy work environment.  Do people
ever leave the company?  Like, alive?

> > Many examples of Emacs Lisp functions take them.
>
> Like?  Which list manipulation functions do?
> Contrast cl-member to member.

You didn't say "list manipulation function" . You wrote "No Emacs
built-in takes them".  That's false.  Take make-hash-table.  Oh noes,
looks just like CL.  Guess you're going to hand-roll hash tables
now, right? :-)

Take make-process or json-serialize.  There are more.  Keyword
arguments are in other Non-lisp languages too, as you probably
know, they're called named parameters sometimes.  Heck C++
has been pining for them for so long it's sad.

> > All code is bad.
>
> With that outlook, there's not much of a purpose in writing any code for
> Emacs, is there?

There is, because bad as it is, code gets jobs done that humans can't do.

> But the Emacs Lisp compiler doesn't inline functions, does it?

No, but you do, in actual source code!  That was my point!  You
have these fine abstractions to common operations like intersecting
sets, finding indices, and so much more, and you prefer to handroll
your expanded versions each time instead of going through a function
of an established library.

Very rarely, IME, are there for doing this manual inlining
even more rarely in Elisp which has a compiler-macro mechanism.

João



reply via email to

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