From: Lionel Thiry Date: 2005-04-20T07:19:38+09:00 Subject: Re: - E03c - The Ruby Object Model (Revised Documentation) Ilias Lazaridis a �crit : > Lionel Thiry wrote: > >> Ilias Lazaridis a �crit : >>> But as it looks, this community is incapable to do so (giving >>> productive feedback). >> >> >> I can. >> >> - >> >> But there are other ways of asking, you know... :( > > > there are other ways of answering, too. You're right! :) Then change your way of asking, and I bet people will change their ways of anwsering! :) >> I'll give it a try: the documentation "ri Class" gives is not wrong at >> all. Maybe not complete, but not wrong. > it's incomplete, wrong and missleading. I may seem to ask a bit too much of you, but, would you mind explain where it is wrong? >> I remember that what was disturbing you was the stuff about >> metaclasses. I told you ruby invite you to think more in terms of >> singleton method than in terms of metaclasses. But it seems that you >> ignore what are singleton methods. > > of course i ignore them. > > they are not relevant when reviewing ruby's oject-model. > If you knew about singleton methods, the said metaclasses would not have been such a source of confusion for you. >> http://lazaridis.com/case/lang/ruby/TheRubyObjectModel.png >> >> Your UML diagram of ruby object model is hard to read, and probably >> wrong. The separation between classes in memory and in source code is >> totally confusing. > > > the seperation exist in reality (and in the "ri class" documentation). > > additionally: It was neccessary for my understanding process. > > the next version (1.1), the diagramm will be simplified (possibly in a > few hours, if the stuff has passed). > >> In ruby, classes *are* objects. > > > yes, but there is still a class definition. In fact, not even. In java or C++, they are processed during compilation, not during execution. In ruby, those "declarations" are really processed during execution. So, they look like declarations, but they are not: they are instructions. Hence I told you that separation in your UML diagram is a source of confusion. > >> Learn more about classless languages, and it should be far easier to >> understand these concepts. > > > this is not relevant to understand ruby's Object Model. But this would help you so much! > > I just need a (correct) UML diagram to understand Ruby's Object Model. > >> >> There is another evident mistake in your UML diagram. Object doesn't >> inherit from nil, nil is a literal and an instance of NilClass which >> inherit from Object. > > > you are wrong: By the way, you should never say to someone "you are wrong". Prefer to say "If you are right, then, I don't understand this". Doing things that way, you'd avoid a lot of flaming. > > irb(main):001:0> Object.superclass > => nil > irb(main):002:0> nil.class > => NilClass > irb(main):001:0> Object < nil.class => false irb(main):002:0> Object > nil.class => true -- Lionel Thiry Personal website: http://users.skynet.be/lthiry/