15:42 -- Starting 4.9, Java version
15:45 -- done
---
// ch04_ex09.javaclass ch04_ex09 {
void meth1() {
meth2();
this.meth2();
}
void meth2() {}public static void main(String[] args) {
ch04_ex09 obj = new ch04_ex09();
obj.meth1();
}
}
---
---
;;;; 4.9 -- No exact CLOS analogue to the Java; I've done a literal
;;;; translation. A real Lisp program wouldn't do this.
(defclass ch04_ex08 ())
(defmethod meth1 ((this ch04_ex08))
; can't do the first call ("call the second method twice: the first time
; without using this, and the second time using this") because you never
; have to use a "this" object in CLOS, because you don't need to reference
; methods via objects
(meth2 this))
(defmethod meth2 ((this ch04_ex08))
nil)
(let ((obj (make-instance 'ch04_ex08)))
(meth1 obj))
---