emacs-devel
[Top][All Lists]
Advanced

[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.]





reply via email to

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