[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: |
Emanuel Berg |
Subject: |
Re: What's missing in ELisp that makes people want to use cl-lib? |
Date: |
Tue, 05 Dec 2023 11:45:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Dmitry Gutov wrote:
>>> Why do you exempt yourself from this irresponsibility?
>>> Can't you see this is all subjective and it seems a bit
>>> arrogant to say "my code is so responsible"??
>>
>> Thus far there have been no complaints that code_without_
>> cl-lib, pcase, seq or elt is unreadable. Most of our code
>> (this time measured by lines) falls squarely within
>> that category.
>
> Without having a specific enemy to blame, when the function
> is long, people just either admit out loud they find the
> code difficult or silently avoid changing it.
The way people have been writing Elisp in functions that are so
long it is insane always puzzled me. I mean, not because they
were so long - just look at the Gnus source for example - but
why they were written like that to begin with?
Also the files themselves are so long? (Maybe because they are
made up of so long functions LOL.)
In my own Elisp I never had that problem of almost endless
functions. But I'm unsure why, maybe people solved much more
difficult problems then? *impressed* *envious*
But I think cl-lib and pcase should make the code more compact
(i.e., shorter lines for the same job).
So yeah, it is less complexity in the sense fewer lines and
more standard library usage.
But also more complexity in the sense people have to learn the
basics of cl-lib and pcase, at the very least, including their
mini-languages (e.g. `cl-loop'), and further not be frustrated
by what they can't learn by heart the way they once mastered
Elisp but must look up in docstrings when encountered.
One can also hope that the most common use cases of cl-lib and
pcase will in time be idiomatic as well - so even tho you
don't know the whole library or construct by heart, the way
they are usually applied, that will be familiar enough to the
trained eyes of Emacs maintainers and contributors.
For example, I'm sure many people are fond of their scientific
calculators. And are quite fluent with those. But no one knows
what all these functions and buttons, every single one,
actually do, right?
--
underground experts united
https://dataswamp.org/~incal
- Re: What's missing in ELisp that makes people want to use cl-lib?,
Emanuel Berg <=