[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
false and types
- To: info-dylan@cambridge.apple.com
- Subject: false and types
- From: thant@void.esd.sgi.com
- Date: Thu, 22 Oct 92 14:09:23 PDT
(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?
thant