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

false and types

(define-class <foo> (<object>)
  (a type: <integer>
     init-value: #f))		    ;;  Why can you do this...
;Value: <foo>

(define foo (make <foo>))
;Value: foo

(a foo)
;Value: ()

((setter a) foo 3)
;Value: 3

((setter a) foo #f)		    ;; ...if you can't do this?

I figured out that I could do (singleton #f) to create a type for 
a method that dispatched specifically on false, but that isn't
a solution for the above.  In C and C++ NILL is kind of an exception
to the type system, and I thougth #f might play the same role.

What is the *right* thing to do?