[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Internationalize Emacs's messages (swahili)
From: |
Drew Adams |
Subject: |
RE: Internationalize Emacs's messages (swahili) |
Date: |
Sat, 26 Dec 2020 20:03:59 -0800 (PST) |
> > Actually, AFAICT this all started from:
> > (not (null (cdr deleted))) would avoid traversing
> > the entire list, but it wouldn't be easier to read.
>
> No, it started from (> (length LIST) 1) being a waste of cycles.
I can't believe this thread is going on & on about this.
Users need _anyway_ to learn that `length' traverses the
entire list. And it's not the only function that does so.
This is part of learning Lisp (and not just Lisp).
All of your machinations to create additional functions
to "help" users avoid the gotcha of using `length' when
it's not needed won't really help, is my guess.
With that "solution" you've only added a new problem: you
now need to advertise the new functions and advise users
to use them, not `length', in such a use case. Which
means you still have the need to identify the relevant use
cases, which means teach them about the `length' gotcha
(or hope they follow advice without understanding). IOW,
now you have 2 problems...
This seems like a classic case of going against Occam's,
Razor, i.e., a case of multiplying things needlessly.
___
[Personally, in the case considered, I'd use (cdr x).
I wouldn't use (not (null (cdr x))). And it doesn't
get simpler _or clearer_ than that, IMO.]
- Re: Internationalize Emacs's messages (swahili), (continued)
- Re: Internationalize Emacs's messages (swahili), Lars Ingebrigtsen, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Alfred M. Szmidt, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Tomas Hlavaty, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Alfred M. Szmidt, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Tomas Hlavaty, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Alfred M. Szmidt, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Tomas Hlavaty, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Alfred M. Szmidt, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Jean Louis, 2020/12/28
- Re: Internationalize Emacs's messages (swahili), Eli Zaretskii, 2020/12/26
- RE: Internationalize Emacs's messages (swahili),
Drew Adams <=
- lengths and stuff, Daniel Brooks, 2020/12/26
- RE: lengths and stuff, Drew Adams, 2020/12/27
- RE: lengths and stuff, Tomas Hlavaty, 2020/12/27
- RE: lengths and stuff, Drew Adams, 2020/12/27
- RE: lengths and stuff, Tomas Hlavaty, 2020/12/27
- Re: lengths and stuff, Jean Louis, 2020/12/28
- Re: lengths and stuff, Eric Abrahamsen, 2020/12/28
- Re: Internationalize Emacs's messages (swahili), Eli Zaretskii, 2020/12/26
- Re: Internationalize Emacs's messages (swahili), Richard Stallman, 2020/12/27
- Re: Internationalize Emacs's messages (swahili), Eli Zaretskii, 2020/12/26