"Mark H. Weaver" <m...@netris.org> 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>))

and

(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
<nil>.

What do you think?

     Neil


Reply via email to