Ilias is Crazy -- a plea

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. :slight_smile:

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.

how many degrees of separation from Chunky Bacon is Ilias Lazaridis ?

···

On 4/23/05, vruz <horacio.lopez@gmail.com> wrote:

<snip>
> The very thing to do is to not fear. Do the opposite of that. It
> brought a smile to me to see the tail end of a thread started by an
> alleged troll degenerate into a bunch of good-natured nerdy Ruby
> language movie-reference jokes. Trolling is just a form of sadism that
> feeds on the fear of something we value being unjustly smeared. (And
> you can fill in the obvious connections to Star Wars and Harry Potter.
> Perhaps I should worry that these things pop into my mind so quickly.)

hey, I liked that too, this could also spin-off a funny game.

how many degrees of separation from Kevin Bacon is Ilias Lazaridis ?

--
Bill Guindon (aka aGorilla)

Peter Suk <peter.kwangjun.suk@mac.com> writes:

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.)

I'm sure this is not correct for Ruby.

For Smalltalk, I'm not very deep into it, but (Squeak 3.7):

  Object superclass => ProtoObject
  ProtoObject superclass => nil

However:

  nil class => UndefinedObject
  UndefinedObject superclass => Object

ProtoObject *does not inherit from nil*, but from nothing,
*represented by nil*. Behavior explicitly checks if superclass is
nil, e.g. in Behavior#allSuperclasses.

The actual difference is in Smalltalk not as important, though, as you
test with ifNil and therefore can ducktype other objects to nil, which
is not possible in Ruby (there is no #to_b).

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.

Most lisps actually compile their functions and don't run them from
the AST, but that would be possible in theory at least.

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.)

I only have Squeak handy, can't check really. And: You can set the
superclass to be nil, but that makes certain methods not look at the
superclass, not look at nil.

···

On Apr 23, 2005, at 5:58 AM, Christian Neukirchen wrote:

--Peter

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

Ilias
Iliad
lots of reading
learning ruby
cartoon foxes
chunky bacon
kevin bacon

=)

···

On 4/23/05, Bill Guindon <agorilla@gmail.com> wrote:

On 4/23/05, vruz <horacio.lopez@gmail.com> wrote:
> <snip>
> > The very thing to do is to not fear. Do the opposite of that. It
> > brought a smile to me to see the tail end of a thread started by an
> > alleged troll degenerate into a bunch of good-natured nerdy Ruby
> > language movie-reference jokes. Trolling is just a form of sadism that
> > feeds on the fear of something we value being unjustly smeared. (And
> > you can fill in the obvious connections to Star Wars and Harry Potter.
> > Perhaps I should worry that these things pop into my mind so quickly.)
>
> hey, I liked that too, this could also spin-off a funny game.
>
> how many degrees of separation from Kevin Bacon is Ilias Lazaridis ?
>
>

how many degrees of separation from Chunky Bacon is Ilias Lazaridis ?

--
Bill Guindon (aka aGorilla)

...

Noise === Noise

···

On 4/23/05, Sy <sy1235@gmail.com> wrote:

Peter Suk <peter.kwangjun.suk@mac.com> writes:

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.)

I'm sure this is not correct for Ruby.

For Smalltalk, I'm not very deep into it, but (Squeak 3.7):

  Object superclass => ProtoObject
  ProtoObject superclass => nil

Ah, this is Squeak's "Burn the diskpacks!" philosophy at work. "Object superclass" in VisualWorks yields nil. Also in ObjectStudio. In Smalltalk Agents, Object is actually a subclass of Collection, which makes sense. (In Smalltalk all objects partially duck-type as a collection. They all understand at: and at:put: .)

However:

  nil class => UndefinedObject
  UndefinedObject superclass => Object

ProtoObject *does not inherit from nil*, but from nothing,
*represented by nil*. Behavior explicitly checks if superclass is
nil, e.g. in Behavior#allSuperclasses.

Ahead of you here. Remember I say above:

(And remember, you >don't<
inherit from the metaclass of your superclass.)

UndefinedObject is effectively the metaclass of the superclass of Object. And you don't inherit from the metaclass of your superclass. You can think of nil as the only structure-less Behavior in Smalltalk. How you term it is arbitrary, since what it does is what really matters.

Most lisps actually compile their functions and don't run them from
the AST, but that would be possible in theory at least.

One can think of this as an implementation detail. Most commercial Smalltalks also are compiled down to machine language. My lisper coworker told me that Symbolics Lisp could switch between these two modes, depending on what it could get away with in any given situation.

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.)

I only have Squeak handy, can't check really.

I bet if you go back to an early enough implementation of Squeak, you will find Object at the root hierarchy, since Squeak's image started using the Smalltalk-80 image. Also, my project at work in VisualWorks has proxies with superclass of nil. ObjectStudio definitely does. It's a fairly standard thing, since it makes implementing proxies easier.

And: You can set the
superclass to be nil, but that makes certain methods not look at the
superclass, not look at nil.

That's really an implementation detail -- people doing conditional logic where polymorphism would also do. I just inspected UndefinedObject in Squeak 3.7 and used the inspector window to set its superclass to Class. Now we can reimplement methods like allSuperclasses so that they are polymorphic. (Well, you have to change a bunch of other assumptions in the system too. Browsers will now throw exceptions on certain operations. But things still *kinda* work. :slight_smile:

I know there is a doesNotUndertand equivalent, so Ruby has forwarding proxies. Is there an equivalent of become: ?

--Peter

···

On Apr 23, 2005, at 9:24 AM, Christian Neukirchen wrote:

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.

Peter Suk <peter.kwangjun.suk@mac.com> writes:

And: You can set the
superclass to be nil, but that makes certain methods not look at the
superclass, not look at nil.

That's really an implementation detail -- people doing conditional
logic where polymorphism would also do. I just inspected
UndefinedObject in Squeak 3.7 and used the inspector window to set its
superclass to Class. Now we can reimplement methods like
allSuperclasses so that they are polymorphic. (Well, you have to
change a bunch of other assumptions in the system too. Browsers will
now throw exceptions on certain operations. But things still *kinda*
work. :slight_smile:

Ok, you are right.

I know there is a doesNotUndertand equivalent, so Ruby has forwarding
proxies. Is there an equivalent of become: ?

Not yet, but I'd love that.

···

On Apr 23, 2005, at 9:24 AM, Christian Neukirchen wrote:

--Peter

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

Using several different sender addresses for posting is not fair!

Bertram

···

Am Sonntag, 24. Apr 2005, 00:51:50 +0900 schrieb Ilias Lazaridis:

...

--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

Ilias Lazaridis <ilias.lazaridis@gmail.com> writes:

···

On 4/23/05, Sy <sy1235@gmail.com> wrote:

...

Noise === Noise

Not in Ruby.

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

Peter Suk <peter.kwangjun.suk@mac.com> writes:

And: You can set the
superclass to be nil, but that makes certain methods not look at the
superclass, not look at nil.

That's really an implementation detail -- people doing conditional
logic where polymorphism would also do. I just inspected
UndefinedObject in Squeak 3.7 and used the inspector window to set its
superclass to Class. Now we can reimplement methods like
allSuperclasses so that they are polymorphic. (Well, you have to
change a bunch of other assumptions in the system too. Browsers will
now throw exceptions on certain operations. But things still *kinda*
work. :slight_smile:

Ok, you are right.

Actually, you don't have to do the thing with changing UndefinedObject's superclass either. You can put in the polymorphism "Duck-Typing" style, so UndefinedObject "Duck-Types" to Class.

I know there is a doesNotUndertand equivalent, so Ruby has forwarding
proxies. Is there an equivalent of become: ?

Not yet, but I'd love that.

I will put that into Alumina-VM's image just for you, Christian!

--Peter

···

On Apr 23, 2005, at 11:13 AM, Christian Neukirchen wrote:

On Apr 23, 2005, at 9:24 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.