guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GH replacement proposal (includes a bit of Unicode)


From: Paul Jarc
Subject: Re: GH replacement proposal (includes a bit of Unicode)
Date: Thu, 22 Apr 2004 14:31:48 -0400
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Dirk Herrmann <address@hidden> wrote:
> The names scm_is_true and scm_is_false don't fit into the schema,
> since true and false are no types.

We might think of these scm_is_* functions more generally as
predicates, some of which happen to be type predicates.  But I agree
that type predicates ought to have their own naming convention
separate from other predicates.  (OTOH, we could think of types as
general sets of values, and these two sets just happen to not
correspond directly to any C-level type tag.)

Then again, I think I'm pretty happy with what we have in validate.h.
Shrug.

> Further, if implemented as above, scm_is_true does not bring
> additional benefit and is confusing, since scm_is_false checks for
> #f, while scm_is_true checks for not-#f.

They may be more readable in different situations.  It's up to the
programmer to use them well.

> But, there is still not yet any function that checks for #t. To do
> so, you would first have to call scm_is_bool and scm_is_true
> afterwards.

Or, as Marius suggested, scm_is_eq(x, SCM_BOOL_T).


paul




reply via email to

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