[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[EVALUATION] - E03e - The Ruby Object Model (Summary

Ilias Lazaridis

4/21/2005 12:34:00 PM

[EVALUATION] - E03d - The Ruby Object Model (End Game)
http://groups-beta.google.com/group/comp.lang.ruby/msg/ea9da5...

-

The above thread has led to this code:

class Class
def Meta()
@Meta ||= (class<<self;self;end)
end
end

which is modified here to:

class Object
def sso()
@sso ||= (class<<self;self;end) # see code below
end
end

simplified:
def sso()
unless @sso
@sso = (class<<self; self; end) #
end
@sso
end

-

sso = Specializing Singleton Object

-

The sso contains definitions (methods, attributes, constants) which
specialize the behaviour of its carrying object.

The "sso" of a "class object" is used to specialize the behaviour of the
class (against Class).

-

The sso's are essentially internal implementation details, although they
are accessible (see code above).

The sso's are _not_ part of the Ruby Object Model (e.g. inheritance
hierarchy).

-
-
-

As stated before, the following documentation is false:

cmd:> ri Class

"Classes, modules, and objects are interrelated. In the diagram that
follows, the arrows represent inheritance, and the parentheses
meta-classes. All metaclasses are instances of the class `Class'."

+------------------+
| |
Object---->(Object) |
^ ^ ^ ^ |
| | | | |
| | +-----+ +---------+ |
| | | | |
| +-----------+ | |
| | | | |
+------+ | Module--->(Module) |
| | ^ ^ |
OtherClass-->(OtherClass) | | |
| | |
Class---->(Class) |
^ |
| |
+----------------+

-

a) The term "meta-classes" is false.
Correction: "specializing-singleton-objects"

b) vertical arrows do not represent inheritance
e.g.: Object---->(Object)
Correction: Object-----(Object)

c) the classes in "()" do not belong to the object model
Correction: remove (showcase sso in seperate topic)

-
-
-

My final questions are basicly:

* Ruby is OO. Why is the sso not directly accessible?

* Who has written the "ri Class" documentation?

* Can I expect an apology for this false documentation?

-
-
-

http://laz.../case...

.

--
http://laz...
83 Answers

Austin Ziegler

4/21/2005 1:29:00 PM

0

[Fair warning to those who plan on emailing me regarding this
response. I'll be ignoring you. I am posting this to make sure that
there is a public refutation to Ilias's incorrect statements below.
-a]

On 4/21/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> As stated before, the following documentation is false:

Stated incorrectly. The documentation is, in fact, correct. It
doesn't mesh with UML, perhaps, and it doesn't mesh with your
limited capacity for understanding, but that doesn't make it
incorrect.

Metaclass -- singleton class, virtual class, or whatever you wish to
call it -- is something that doesn't mesh well with standard object
notations. You are the first person that I've seen in three and a
half years to suggest that they don't understand this documentation
once they've started playing with the capabilities of Ruby and
understanding the practical means by which the object model is
supported in the language. As others have pointed out -- with lots
of supporting code -- it is not the documentation which is wrong
here.

[...]

> a) The term "meta-classes" is false.
> Correction: "specializing-singleton-objects"

It is not false. It is, perhaps, over used in a variety of terms. It
is "meta" in terms of Ruby objects. Your term may be more useful in
the future, but I have my doubts. As Class is an Object, a MetaClass
is a MetaObject ;)

> b) vertical arrows do not represent inheritance
> e.g.: Object----> (Object)
> Correction: Object-----(Object)

Those are horizontal, not vertical. It is also one of those things
that, as others have pointed out, is not *quite* as *you* understand
it. Metaobjects don't show up in the public inheritance hierarchy,
but that makes them no less real.

> c) the classes in "()" do not belong to the object model
> Correction: remove (showcase sso in seperate topic)

This is incorrect. The metaobjects/metaclasses shown in the diagrams
are essential, if not normally visible, parts of the Ruby Object
Model. I do not believe that this is just an implementation detail,
as it is exposed to the language for use.

> My final questions are basicly:
> * Ruby is OO. Why is the sso not directly accessible?

The metaobjects/metaclasses are not directly accessible because Matz
has chosen not to make them directly accessible. There is an RCR
which recommends the creation of a method to make this easily and
directly accessible because Ruby developers have discovered the
value and utility that these metaobjects have. There is significant
disagreement on the name of what this method should be. However, as
Why the Lucky Stiff has demonstrated, it's a no-brainer for users to
develop this single method themselves -- and he's even written it
for them to copy or use as they please.

> * Who has written the "ri Class" documentation?

Matz wrote the essentials. I don't think that anyone knows the Ruby
object model better than he.

> * Can I expect an apology for this false documentation?

Given that the docuemntation isn't false, no. Of course, even if you
*were* correct and the documentation was false, I suspect that you'd
get an apology only if hell is endothermic. And, as we all know,
it's exothermic. (Either that, or you'll get your apology after all
atomic motion has stopped because.)

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca



James Gray

4/21/2005 1:38:00 PM

0

On Apr 21, 2005, at 7:39 AM, Ilias Lazaridis wrote:

> b) vertical arrows do not represent inheritance
> e.g.: Object---->(Object)
> Correction: Object-----(Object)

Pretty sure you mean "horizontal arrows" not "vertical arrows".

> My final questions are basicly:
>
> * Ruby is OO. Why is the sso not directly accessible?

You've posted code in this message showing how to access an "sso".

James Edward Gray II



Ilias Lazaridis

4/21/2005 1:57:00 PM

0

James Edward Gray II wrote:
> On Apr 21, 2005, at 7:39 AM, Ilias Lazaridis wrote:
>
>> b) vertical arrows do not represent inheritance
>> e.g.: Object---->(Object)
>> Correction: Object-----(Object)
>
> Pretty sure you mean "horizontal arrows" not "vertical arrows".

yes, of course.

my apologies.

>> My final questions are basicly:
>>
>> * Ruby is OO. Why is the sso not directly accessible?
>
> You've posted code in this message showing how to access an "sso".

which is an indirection.

My question contains "directly".

[please no more harisplitting]

> James Edward Gray II

.

--
http://laz...

Trans

4/21/2005 2:04:00 PM

0

So it's "sso" now, ey? A small step to "sos", and then on to "sob" ;-)

Henrik Horneber

4/21/2005 2:16:00 PM

0


>>> My final questions are basicly:
>>>
>>> * Ruby is OO. Why is the sso not directly accessible?
>>
>>
>> You've posted code in this message showing how to access an "sso".
>
>
> which is an indirection.
>
> My question contains "directly".
>
> [please no more harisplitting]
>


Strange, first you complain about somebody else not following your
question word-by-word, and next sentence you complain about
hairsplitting. Pot. Kettle. Black. And just in case you don't know that
phrase, the german equivalent'd be "Wer im Glashaus sitzt, sollte keine
Steine werfen." (Your website is registered in Germany and your
snail-mail address is german).

So, to come back to topic, maybe you should define "directly" first?

You can access your so called "sso"s from within Ruby, without
resorting to third party libraries or low level C code. That is
"direct", in my book at least.Just because you don't like the syntax
_how_ you can access them doens't mean they're not readily accessible,
as numerous posters before have answered already. And you even got a
"direct" answer to your question, from Austin Ziegler

---8<-----
The metaobjects/metaclasses are not directly accessible because Matz
has chosen not to make them directly accessible. There is an RCR
which recommends the creation of a method to make this easily and
directly accessible because Ruby developers have discovered the
value and utility that these metaobjects have. There is significant
disagreement on the name of what this method should be. However, as
Why the Lucky Stiff has demonstrated, it's a no-brainer for users to
develop this single method themselves -- and he's even written it
for them to copy or use as they please.
---8<-----

So. There. Respect somebody investing time to answer by at least reading
the answers.


Ilias Lazaridis

4/21/2005 2:29:00 PM

0

Henrik Horneber wrote:
>>>> My final questions are basicly:
>>>> * Ruby is OO. Why is the sso not directly accessible?
>>>
>>> You've posted code in this message showing how to access an "sso".
>>
>> which is an indirection.
>>
>> My question contains "directly".
>>
>> [please no more harisplitting]
>
> Strange, first you complain about somebody else not following your
[...] - (even more hairsplitting)

I hope the responsible person has more courage.

.

--
http://laz...

Tanner Burson

4/21/2005 2:36:00 PM

0

> [...] - (even more hairsplitting)
>
> I hope the responsible person has more courage.
>

Since you are no longer contributing to this thread, and have been
given the answers you requested. This thread is closed, please
refrain from posting further in it.

[thread closed]
--
===Tanner Burson===
tanner.burson@gmail.com
http://tanner... <---Might even work one day...



Ilias Lazaridis

4/21/2005 2:40:00 PM

0

Austin Ziegler wrote:
> [Fair warning to those who plan on emailing me regarding this
> response. I'll be ignoring you. I am posting this to make sure that
> there is a public refutation to Ilias's incorrect statements below.
> -a]
>
> On 4/21/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
>
>>As stated before, the following documentation is false:
>
> Stated incorrectly. The documentation is, in fact, correct. It
[...] - (babbling, justifying, talkaround)

the documentation is false.

see below.

>>a) The term "meta-classes" is false.
>>Correction: "specializing-singleton-objects"
>
> It is not false.
[...] - (babbling, justifying, talkaround)

"meta-classes" is completely false.

possibly you believe this one more:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...

>>b) vertical arrows do not represent inheritance
>>e.g.: Object----> (Object)
>>Correction: Object-----(Object)
>
> Those are horizontal, not vertical.

ok, my mistake.

I apologize.

> It is also one of those things
[...] - (babbling)

please focus.

ri Class states: "the arrows represent inheritance"

but: the _horizontal_ arrows do _not_ represent inheritance.

this is a simple, clear and undoubtable error.

>>c) the classes in "()" do not belong to the object model
>>Correction: remove (showcase sso in seperate topic)
>
> This is incorrect. The metaobjects/metaclasses shown in the diagrams
> are essential, if not normally visible, parts of the Ruby Object
> Model.

This is false, see below

> I do not believe that this is just an implementation detail,
> as it is exposed to the language for use.

what you believe is irrelevant.

reality counts.

and (especially for you) possibly this here:

http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-...

>>My final questions are basicly:
>>* Ruby is OO. Why is the sso not directly accessible?
>
> The metaobjects/metaclasses are not directly accessible because Matz
> has chosen not to make them directly accessible.
[...]

I see.

>>* Who has written the "ri Class" documentation?
>
> Matz wrote the essentials.

what do you mean by "essentials"?

Is Mr. Matsumoto the author of the "ri Class" content or not?

> I don't think that anyone knows the Ruby
> object model better than he.

"knowing" means not in the same time "ability to communicate".

>>* Can I expect an apology for this false documentation?
>
> Given that the docuemntation isn't false, no.
[...] - (babbling)

This question target's the responsible person.

.

--
http://laz...

Tanner Burson

4/21/2005 2:56:00 PM

0

On 4/21/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> Austin Ziegler wrote:
> > [Fair warning to those who plan on emailing me regarding this
> > response. I'll be ignoring you. I am posting this to make sure that
> > there is a public refutation to Ilias's incorrect statements below.
> > -a]
> >
> > On 4/21/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> >
> >>As stated before, the following documentation is false:
> >
> > Stated incorrectly. The documentation is, in fact, correct. It
> [...] - (babbling, justifying, talkaround)
>
> the documentation is false.
>
> see below.
[...] - (repeating questions already answered)

>
> >>b) vertical arrows do not represent inheritance
> >>e.g.: Object----> (Object)
> >>Correction: Object-----(Object)
> >
> > Those are horizontal, not vertical.
>
> ok, my mistake.
>
> I apologize.
[...] - (repeating questions already answered)
>
> > I do not believe that this is just an implementation detail,
> > as it is exposed to the language for use.
>
> what you believe is irrelevant.
>
> reality counts.
>

what you believe to be reality is irrelevant.
the opinions of those actually using the language on a daily basis for
real applications, counts.
the opinions of those glancing across the language without attempting
to use it, is rrelevant.


>
> >>* Who has written the "ri Class" documentation?
> >
> > Matz wrote the essentials.
>
> what do you mean by "essentials"?
Possibly this will help?
http://dictionary.reference.com/search?q=...
>
> Is Mr. Matsumoto the author of the "ri Class" content or not?
>
> > I don't think that anyone knows the Ruby
> > object model better than he.
>
> "knowing" means not in the same time "ability to communicate".
>
have you attempted communication with him? if so please provide
transcripts or links of this.

> >>* Can I expect an apology for this false documentation?
> >
> > Given that the docuemntation isn't false, no.
> [...] - (babbling)
>
> This question target's the responsible person.
>
responsible for what? providing documentation you are incapable of
understanding?

> ..
>
> --
> http://laz...
>
>


--
===Tanner Burson===
tanner.burson@gmail.com
http://tanner... <---Might even work one day...



Lyndon Samson

4/21/2005 3:17:00 PM

0

On 4/22/05, Tanner Burson <tanner.burson@gmail.com> wrote:
> > [...] - (even more hairsplitting)
> >
> > I hope the responsible person has more courage.
> >
>
> Since you are no longer contributing to this thread, and have been
> given the answers you requested. This thread is closed, please
> refrain from posting further in it.
>

Crikey, I woke up one morning and ruby-talk was a dictatorship...

:-)

--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.