[Top][All Lists]

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

Re: truth of %nil

From: Neil Jerram
Subject: Re: truth of %nil
Date: Sun, 30 Aug 2009 12:20:20 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

"Mark H. Weaver" <address@hidden> writes:

> I found one thorny use of scm_is_bool and scm_is_null, and request
> your collective wisdom:
> scm_class_of() in goops.c tries to determine the class of a scheme
> value.  If scm_is_bool returns true, it's classified as
> scm_class_boolean, and if scm_is_null returns true, it's classified as
> scm_class_null.  Right now, that code doesn't consider %nil at all.

So currently the code (using your clarified APIs) gives
scm_class_unknown, right?

> How do you all think %nil should be handled by goops?

Given the %nil concept, I suppose what matters is that a %nil value
should be able to match both

(define-method f (arg <null>))


(define-method f (arg <boolean>))

That suggests to me that there should be a class <nil> that inherits
from both <null> and <boolean>, and that (class-of %nil) should be

What do you think?


reply via email to

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