You should attend my talk if you’re going to OSCON! 
Wish I could.
Will you share notes afterward? Or
a .mpg even?
First off, is_a?' is aliased to
kind_of?'.
Ouch!! Of course it is.
Secondly, this is not the same ralationship implied by `class’:
irb(main):001:0> 5.class == Integer
=> false
irb(main):002:0> 5.kind_of? Integer
=> true
I was thinking (to use the term ‘thinking’ loosely)
that is-a referred to the actual class and kind-of
referred to the class or anything higher in the
hierarchy.
Silly, of course. Mea culpa. Spaniel is-a Dog is-a Mammal.
Thirdly, your last statement is false:
irb(main):001:0> Fixnum.superclass == Integer
=> true
irb(main):002:0> Fixnum.kind_of? Integer
=> false
You’ve nailed me again. Surely this puts me on
some kind of probation.
In fact, superclass' and
kind_of?’ are fairly loosely related; you can’t
call superclass' on any object, like you can with
kind_of?'.
Might I make a suggestion? Draw a red line from a' to
b’ if b' is in
a.ancestors’. (This will make the module lines red, also. Make sure
your
lines go the right way; File should point to IO, right?)
This means no red line from Object to Class; yes, Object.is_a? Class', but instances of Object don't get any methods from Class. Use blue lines to show the
class’ relationship (or, if you prefer, the is_a?' or
kind_of?’
relationship, which is a superset). My point is, there’s a big difference
between the relationships “Fixnum → Integer” and “Object → Class”.
I’ll have to think on this when I’m less hungry/tired/stupid.
Thanks for your comments.
Hal
···
----- Original Message -----
From: “Chris Pine” nemo@hellotree.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Wednesday, April 23, 2003 5:18 PM
Subject: Re: [ANN] Ruby.shop