Contents (package MULK.OBJECTIVE-CL)
Constant Variable +YES+
The Objective-C boolean value
+yes+ is the constant corresponding to the Objective-C
As there is no way to distinguish methods that return booleans from those that return numbers in the Objective-C runtime, all invocations that ought to return booleans will actually return one of two compile-time Objective-C constants: either
NO. Lisp code using Objective-CL needs to be aware of this and test return values accordingly. For this to be possible, two constants are defined on the Lisp side, analogously to Objective-C. These are called +yes+ and +no+.
(invoke (find-class 'ns-string) :is-subclass-of-class (find-class 'ns-object)) ;=> #.YES (invoke (find-class 'ns-object) :is-subclass-of-class (find-class 'ns-object)) ;=> #.YES (invoke (find-class 'ns-object) :is-subclass-of-class (find-class 'ns-string)) ;=> #.NO