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

PCL question

I was fiddling around with the latest PCL (or at least it was a week or so
ago), and it compiles almost perfectly now (this is called the
5/1/90  May Day PCL (REV 2) version, by the way).  Using a slightly patched
version of MACL 1.3.1, I noted the following behavior (a behavior which I
also found to occur with Victoria Day PCL/1.3.1 mods).

Also, note that this worked with earlier versions of PCL/1.2.1, and is taken
from Winston & Horn's Lisp (3rd edition)...

Given (in a separate window):

(defclass friend ()
  ((name :accessor friend-name :initarg :friend)))

(defclass hacker-friend (friend) ())

(defclass entrepreneur-friend (friend) ())

(defclass philosopher-friend (friend) ())

(defclass article ()
  ((title :accessor article-title :initarg :title)
   (author :accessor article-author :initarg :author)))

(defclass computer-article (article) ())

(defclass business-article (article) ())

(defclass political-article (article) ())

(setf articles (list (make-instance 'business-article
                                    :title "Memory Prices Down")
                     (make-instance 'computer-article
                                    :title "Memory Speeds Up")
                     (make-instance 'political-article
                                    :title "Memory Impugned")))

(setf friends
      (list (make-instance 'hacker-friend :name 'Dan)
            (make-instance 'hacker-friend :name 'Gerry)
            (make-instance 'entrepreneur-friend :name 'Philip)
            (make-instance 'philosopher-friend :name 'David)))

By doing an Eval Buffer on the above, I get:

#<Standard-Class pcl::friend 3992784>
#<Standard-Class pcl::hacker-friend 4028688>
#<Standard-Class pcl::entrepreneur-friend 4043568>
#<Standard-Class pcl::philosopher-friend 4045488>
#<Standard-Class pcl::article 4049612>
#<Standard-Class pcl::computer-article 4063888>
#<Standard-Class pcl::business-article 4065396>
#<Standard-Class pcl::political-article 4066908>
(#<pcl::business-article 4167976> #<pcl::computer-article 4241648> #<pcl::political-article 4
> Error: Invalid initialization argument :name for class hacker-friend
> While executing: check-initargs-1
> Type Command-/ to continue, Command-. to abort.
1 > 

Is there some reason for this?  [I tried xname in place of name, but the same
thing occurred; I recall swapping (setf friends... and (setf articles... and
having the same occur with articles.  Is this PCL related or MACL related?

--Frank Malczewski              (malczews@nunki.usc.edu)