GNU bug report logs -
#7086
`booleanp' return value is multi-valued list
Previous Next
Reported by: MON KEY <monkey <at> sandpframing.com>
Date: Wed, 22 Sep 2010 21:56:01 UTC
Severity: minor
Tags: notabug
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 9/22/10 4:35 PM, Juanma Barranquero wrote:
> On Wed, Sep 22, 2010 at 23:58, MON KEY<monkey <at> sandpframing.com> wrote:
>
>> "Return non-`nil' if OBJECT is one of the two canonical boolean
>> values: `t' or `nil'."
>>
>> It should be documented both in the manual and the docstring of `booleanp' that
>> its return value is a list.
>
> Why? It is a type predicate. If anything, it should be changed to
> return t or nil, as "(elisp)2.6 Type Predicates" says:
>
> A type predicate function takes one argument; it returns `t' if the
> argument belongs to the appropriate type, and `nil' otherwise.
>
> The fact that it returns nil or a list is an implementation detail.
>
>> Indeed, while I can appreciate why (booleanp nil) returns a two element list
>> I'm unable to reason a rationale for why (booleanp t) doesn't?
>
> Why do you expect any kind of rationale, other than the simple fact
> that it is implemented as
>
> (memq object '(nil t)))
(and (memq object '(nil t))
t)
would be better.
--
Kevin Rodgers
Denver, Colorado, USA
This bug report was last modified 14 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.