From: Chris Pine Date: 2003-04-24T14:10:09+09:00 Subject: Re: Subject: Re: [ANN] Ruby.shop ----- Original Message ----- From: "Hal E. Fulton" > Hal E. Fulton wrote: > > > What's your take on the circularity at the top? Chris says > > that Object doesn't take anything from Class. I thought it > > did. I'll have to think about that tomorrow. > > dave[Work/rubybook 1:59:09] irb > irb(main):001:0> Object.class > => Class ---------------------------- Object is a class, yes. But objects are not classes. Are you documenting Object, or are you documenting objects? ---------------------------- Perhaps the bottom line is that my red arrows are all backward? ---------------------------- No. Here's what I think about your arrows: First, change all blue arrows to red, since they basically mean the same thing (objects of class A get functionality from class/module B). Second, switch your IO --> File arrow to be File --> IO. You just made a mistake there. Third, either get rid of the Object --> Class arrow (since, as you pointed out, Object does *not* inherit from Class), or change it to a blue line. A blue line would mean "point to your class". Every class (Object, Module, and even Class itself) should have a blue line pointing to Class, if you decide to include blue lines at all; likewise, every module would have a blue line pointing to Module. This is the *only* line from Object to Class. Why include it unless you are also including the blue line from Class to itself? Or from Module to Class? I wouldn't suggest putting in the blue lines at all unless you are going to include some non-class/module objects in the picture; otherwise, all of your blue lines just point to Class or Module, and it creates a lot of clutter. But, if you wanted, you could have "hello" --> String and 5 --> Fixnum (both blue lines, *exactly* like Object --> Class, and totally unlike Fixnum --> Integer). There's a lot of confusion about this, and there doesn't need to be. If you are going to include a line from Object to Class, *please* consider that that relationship is *no* different from Module --> Class, or File --> Class, or Class --> Class. Why include one line and not the others? Chris