[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Object Lisp and 2.0
- To: PALEXANDER@kuhub.cc.ukans.edu
- Subject: Object Lisp and 2.0
- From: firstname.lastname@example.org (Gail Zacharias)
- Date: Thu, 5 Apr 90 13:32:52 EDT
- Cc: email@example.com
- In-reply-to: <9004051414.AA07334.firstname.lastname@example.org>; from "Andrew L. M. Shalit" at Apr 5, 90 10:14 am
> From: email@example.com (Andrew L. M. Shalit)
> From: PALEXANDER@kuhub.cc.ukans.edu
> First, what will happen to Object Lisp when CLOS shows up? I am trying to
> make an implementation direction decision and am wondering if I will have
> to rewrite my entire system if I don't use PCL now.
> I believe Object Lisp will largely go away. Perhaps someone more
> directly involved in the 2.0 effort could comment on this.
Object Lisp will totally go away. CLOS will be the only native object system.
(though it might be possible to do an Object Lisp implementation on top of
CLOS). All user interface code will be in CLOS (we'll try to provide some
editor tools to convert your Object Lisp user interface code to CLOS).
Basically, you should use PCL for new code unless you need to access the user
interface stuff, in which case I would recommend writing CLOS-style Object
Lisp code: strict class/instance distinctions, no dynamic HAVE's (i.e. put
all HAVE's at top level (i.e. non-conditional) inside EXIST) etc. I also
found it useful to wrap normal functions around Object Lisp functions, e.g.:
(defun frobulate (frotz x y) (ask frotz (object-lisp-frobulate x y)))
(defobfun (object-lisp-frobulate *frotz*) (x y) .....)
and then use frobulate rather than object-lisp-frobulate throughout your code.
Then when you convert to CLOS, you just have change the definition to
(defmethod frobulate ((frotz frotz) x y) .....)
and you don't have to change any of the callers.