No. Object doesn't have a superclass, as much as Lisp's T doesnt have
a superclass. It is not nil, even if ***** may think that.
In the Smalltalk world, "not having a * in slot x" and the * being nil are equivalent. So if the thing in the superclass slot of Object's class is nil, Object's superclass is nil. Also note that Object (and other classes in most Smalltalks, see below) inherit everything they possibly can from nil -- which is nada. (And remember, you >don't< inherit from the metaclass of your superclass.)
Also, CLOS doesn't have "Object", it uses T for that.
My bad. I was assuming from the conversation with my Lisper coworker. I'll have to download a Common Lisp. Haven't played with one since college. Apparently, there's a lot of neat stuff in there. My lisper coworker also noted that the way Ruby defines methods seems to be similar to the way Lisp does it. Lisp is automatically its own AST. Under the covers in Ruby, the AST subtree of the method def is sent to the class.
Hence Lisp springs from "Truth." While Smalltalk and Ruby spring from
the "void" or "nothingness." There is an eastern/western religion
thing in there somewhere.Well, that's not entirely true... IIRC, Lisp's NIL is an own rootclass
too (or something different, as you can't inherit from it..., but it
is not derived from T), so you have T and NIL as "rootclasses",
whereas Smalltalk and Ruby have only one, ProtoObject and Object
respectively.
Not all Smalltalks have a ProtoObject. (Is that VisualAge?) Also, Proxy objects are often defined that have nil as a superclass in different Smalltalks. (Another amusing anecdote: the Refactoring Browser guys, John Brant and Don Roberts, do as a part of their demo, the renaming of the root class Object (and all references) in the running image. After only a few minutes, we find we are doing Thingy-Oriented programming.)
That said, Lisp's T and NIL could stand for yin and yang or whatever
you like.
I was thinking more along the lines of Lisp's T being the absolutism of western religions, and Smalltalk and Ruby's nil origins reminding me of Zen. But this is not being fair to Lisp. Lisp's T doesn't stand for "The Truth" in a dogmatic sense. It stands for "Mathematical Truth."
--Peter
···
On Apr 23, 2005, at 5:58 AM, Christian Neukirchen wrote:
--
There's neither heaven nor hell, save what we grant ourselves.
There's neither fairness nor justice, save what we grant each other.