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: Fri, 1 Jan 2021 11:09:07 -0800 (PST)

> > The Lisp definitions I posted don't have these problems.  They handle
> > circular and dotted lists fine.  For dotted lists, the length returned
> > is always the same as what it would be for a proper list equal to the
> > dotted list but with the last cdr wrapped in `list'.
> 
> The predicates are trying to fix cases where people use length.
> 
> (length '(1 2 . 3))
> =>
> Debugger entered--Lisp error: (wrong-type-argument listp 3)

Yes.  And?

If we're defining predicates to check whether the
length of a list is <, =, or > some value, those
predicates should do something useful, or at least
something one might expect, for non-proper lists
as well, no?

If you check `length<' for a dotted list, whether
on purpose or not (e.g., knowing, not knowing or
not caring whether the list is proper), would you
really expect that a true/false value would be
returned and sometimes an error would be raised?

I think it's more useful for a reasonable value to
always be returned for that.  Or one could argue
that an error should always be raised for that.
But sometimes true/false and sometimes raise an
error?  Why would we choose a design like that?



reply via email to

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