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

Y

Yukihiro Matsumoto

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> I feel sorry that you've misunderstood.
|
|If you really feel sorry, than you should possibly reply to my initial
|message and comment what i've worked-out within the last 2 weeks.

I don't think I could read through all of your post and reply _before_
feeling sorry. And I will add a word "vertical" before "arrow" for
the next check in, anyway.

matz.
 
L

Lyndon Samson

Besides seeing no real need, such method is highly connected to the
current implementation. Future Ruby (or different implementation of

I wonder how JRuby implements it? Any takers for a code-walk?
 
J

Jonas Hartmann

My final questions are basicly:
* Can I expect an apology for this false documentation?
Apology? Read the ruby license again. Hint: you did not buy "ruby".

My suggestion: if you don't like certain parts of the documentation,
discuss the "mistakes", on this group in a friendly way and at the end
rewrite the documentation parts you did not like based on the
discussion's conclusions - after that offer the author of the
documentation to exchange the parts you found mistakes in with your
corrected version.

newbish greetings
Jonas
 
C

csaba

Ilias said:
Austin Ziegler wrote:
"meta-classes" is completely false.

possibly you believe this one more:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/40537 [snip]
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-talk/40548

Guys, Ilias does have a point.

If we insist on that metaclasses as we have now are just an accidental
implementation of the singleton feature -- and the authoritive one,
Matz seems to do so -- then we can conclude that they cannot be part of
the Ruby object model, where Ruby is an abstract entity, Ruby, as such,
the language.

So then I accept that he doesn't accept the "ri Class" diagram. Even if
that's correct if we understood Ruby as its realized by the canonical
implementation today.

However, if we decide to mean Ruby as the abstract language, then maybe
it just doesn't make sense to plea for a *class* diagram -- if we ditch
metaclasses, Ruby's OO ceases to be purely class based. It still makes
sense to ask for some kind of figure representing inheritance.

I don't know UML, is it capable of representing classless (or not fully
class based) OO?

If not, then the answer to Ilias' question: "either mean Ruby as the
current implementation defines it, or don't ask for an UML diagram
'cause can't be made one."

Csaba
 
C

Carlos

Besides seeing no real need, such method is highly connected to the
current implementation. Future Ruby (or different implementation of
Ruby interpreter) may want to choose other strategy, for example,
creating a temporary class-like object to manipulate singleton
methods, then update internal object structure according to that
class-like object. Under the implementation like this, a method to
obtain singleton class has no meaning.

I think, in a 90% the singleton class is used for:

* define methods for the object
* attr
* private
* alias_method
* undef and undef_method

Maybe if you provide a way to do the last four from inside instance_eval,
people would forget the singleton class...
 
D

David A. Black

Hi --

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|I hope the responsible person has more courage.

I may be the responsible person.

I assume your question is why there's no method to obtain singleton
class (per object hidden class), right? That's because I see no real
"need" for it.

Besides seeing no real need, such method is highly connected to the
current implementation. Future Ruby (or different implementation of
Ruby interpreter) may want to choose other strategy, for example,
creating a temporary class-like object to manipulate singleton
methods, then update internal object structure according to that
class-like object. Under the implementation like this, a method to
obtain singleton class has no meaning.

What would: (class << obj; self; end) give you if there's no
singleton class?


David
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> Besides seeing no real need, such method is highly connected to the
|> current implementation. Future Ruby (or different implementation of
|> Ruby interpreter) may want to choose other strategy, for example,
|> creating a temporary class-like object to manipulate singleton
|> methods, then update internal object structure according to that
|> class-like object. Under the implementation like this, a method to
|> obtain singleton class has no meaning.
|
|What would: (class << obj; self; end) give you if there's no
|singleton class?

In that case, it would give you a (perhaps one-time only) class-like
object described above.

matz.
 
J

Jon A. Lambert

[some stuff]

Please stop responding to Ilias, he is crazy. If you stop talking to
him, he will go away.

If you don't believe me, check out this:

http://www.tfeb.org/lisp/mad-people.html

Especially:
Ilias is currently (17-Sep-2002) being almost entirely ignored and is
crying alone to himself, while trying to join in various threads.
With luck if this continues he will get bored and wander off to annoy
people in some other newsgroup. He is one of the most malignant
posters to cll in recent history - between 27-Aug-2002 and
24-Sep-2002 threads begin by him were about 1/4 of the articles in
cll.

Again, this man is insane, so please, please, please refrain from
replying to his posts, or in threads he starts.

If you would, please join us is fighting this problem. For more
details, see:

http://www.zenspider.com/Languages/Ruby/IliasIsCrazy.html

Thank you!

Please remove me from the "Ilias warning" mailing list.
 
D

David A. Black

Hi --

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> Besides seeing no real need, such method is highly connected to the
|> current implementation. Future Ruby (or different implementation of
|> Ruby interpreter) may want to choose other strategy, for example,
|> creating a temporary class-like object to manipulate singleton
|> methods, then update internal object structure according to that
|> class-like object. Under the implementation like this, a method to
|> obtain singleton class has no meaning.
|
|What would: (class << obj; self; end) give you if there's no
|singleton class?

In that case, it would give you a (perhaps one-time only) class-like
object described above.

So....

x = class << obj; self; end
y = class << obj; self; end

x and y would be two class-like objects, instead of one class? Also,
what exactly is a class-like object?

Maybe there should be singleton modules instead of singleton
classes.... (That would also solve the problem of "singleton class"
having two meanings.)


David
 
S

Saynatkari

Le 21/4/2005 said:
On 21 Apr 2005, at 14:59, Jon A. Lambert wrote:

[some stuff]

Please stop responding to Ilias, he is crazy. If you stop talking to
him, he will go away.

If you don't believe me, check out this:

http://www.tfeb.org/lisp/mad-people.html

Especially:
Ilias is currently (17-Sep-2002) being almost entirely ignored and is
crying alone to himself, while trying to join in various threads.
With luck if this continues he will get bored and wander off to annoy
people in some other newsgroup. He is one of the most malignant
posters to cll in recent history - between 27-Aug-2002 and
24-Sep-2002 threads begin by him were about 1/4 of the articles in
cll.

Again, this man is insane, so please, please, please refrain from
replying to his posts, or in threads he starts.

If you would, please join us is fighting this problem. For more
details, see:

http://www.zenspider.com/Languages/Ruby/IliasIsCrazy.html

Thank you!
[snip] incoherent babbling

cannot review request right now
input overflow
-
irrelevant
J. Lambert

E
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> |What would: (class << obj; self; end) give you if there's no
|> |singleton class?
|>
|> In that case, it would give you a (perhaps one-time only) class-like
|> object described above.
|
|So....
|
| x = class << obj; self; end
| y = class << obj; self; end
|
|x and y would be two class-like objects, instead of one class? Also,
|what exactly is a class-like object?

Perhaps. And the latter question is hard to answer, since it still is
a vague idea. I just don't want to deny the possibility of different
implementation.

|Maybe there should be singleton modules instead of singleton
|classes.... (That would also solve the problem of "singleton class"
|having two meanings.)

I'm not sure why singleton modules are better than singleton classes.

matz.
 
F

Florian Groß

Yukihiro said:
|Maybe there should be singleton modules instead of singleton
|classes.... (That would also solve the problem of "singleton class"
|having two meanings.)

I'm not sure why singleton modules are better than singleton classes.

Hm, Modules can not be instantiated (so it would be one less special
case) and the ability of including modules in other objects might be nice.
 
D

David A. Black

Hi --

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|x and y would be two class-like objects, instead of one class? Also,
|what exactly is a class-like object?

Perhaps. And the latter question is hard to answer, since it still is
a vague idea. I just don't want to deny the possibility of different
implementation.

|Maybe there should be singleton modules instead of singleton
|classes.... (That would also solve the problem of "singleton class"
|having two meanings.)

I'm not sure why singleton modules are better than singleton classes.

I didn't express that thought very clearly. I was thinking: modules
are already a sort of "class-like" (but non-instantiable) object. But
it's probably not relevant, since I think what you're talking about is
implementations that avoid the whole container-creation process.


David
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> I'm not sure why singleton modules are better than singleton classes.
|
|I didn't express that thought very clearly. I was thinking: modules
|are already a sort of "class-like" (but non-instantiable) object. But
|it's probably not relevant, since I think what you're talking about is
|implementations that avoid the whole container-creation process.

Yep, singleton class is a long lived object under the current
implementation. The temporal class-like object can reduce number of
live objects. Note that I'm not yet sure if it's a good idea or not.
I just don't want to deny the idea before knowing it's bad.

matz.
 
D

David A. Black

--927295978-1359041401-1114130344=:12785
Content-Type: MULTIPART/MIXED; BOUNDARY="927295978-1359041401-1114130344=:12785"

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.

--927295978-1359041401-1114130344=:12785
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

Hi --

Hm, Modules can not be instantiated (so it would be one less special case= )=20
and the ability of including modules in other objects might be nice.

I like your first point (that was part of what I was thinking too).
But if you include a module in other objects, then it isn't a
singleton module -- it's just a module. It would have to be only
available to the one object. (Assuming I understood your second point
correctly...?)

One advantage of "singleton module" would also be that the whole
"instance_of?" question would disappear. *Nothing* is an instance of
a module, so there would be no issue.


David

--=20
David A. Black
(e-mail address removed)
--927295978-1359041401-1114130344=:12785--
--927295978-1359041401-1114130344=:12785--
 
D

David A. Black

Hi --

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|> I'm not sure why singleton modules are better than singleton classes.
|
|I didn't express that thought very clearly. I was thinking: modules
|are already a sort of "class-like" (but non-instantiable) object. But
|it's probably not relevant, since I think what you're talking about is
|implementations that avoid the whole container-creation process.

Yep, singleton class is a long lived object under the current
implementation. The temporal class-like object can reduce number of
live objects. Note that I'm not yet sure if it's a good idea or not.
I just don't want to deny the idea before knowing it's bad.

Maybe the best thing (easy for me to talk about since I don't have to
implement it :) would be a kind of "class interface" to the object's
singleton methods. If you did:

def obj.new_method
end

no Class would be created. But if you wanted to do other things, you
could still do:

class << obj
include SomeModule
@var = 1
end

etc. "self" in that scope could be a different thing each time (sort
of like Object#method).


David
 
J

Jon A. Lambert

Saynatkari said:
[snip] incoherent babbling

cannot review request right now
input overflow
-
irrelevant

ROTFL. Now I'm going to have to start an Eero warning list.

Now I was just wondering what sort of medication one had to be on to draw an
infinitely recursive object model based on an error condition. Thank
goodness Class#superclass doesn't return -1 on error, otherwise we'd all be
shocked to find out Object inherited from an instance of Fixnum. ;-)
 
J

Jon A. Lambert

Eric said:
[some stuff]
Please stop responding to Ilias, he is crazy. If you stop talking to
him, he will go away.
If you don't believe me, check out this:

http://www.tfeb.org/lisp/mad-people.html

Especially:

Ilias is currently (17-Sep-2002) being almost entirely ignored and
is > crying alone to himself, while trying to join in various threads.
With luck if this continues he will get bored and wander off to annoy
people in some other newsgroup. He is one of the most malignant >
posters to cll in recent history - between 27-Aug-2002 and >
24-Sep-2002 threads begin by him were about 1/4 of the articles in >
cll.

Again, this man is insane, so please, please, please refrain from
replying to his posts, or in threads he starts.

If you would, please join us is fighting this problem. For more details,
see:
http://www.zenspider.com/Languages/Ruby/IliasIsCrazy.html

Thank you!

Please remove me from the "Ilias warning" mailing list.

There is no list, and you are being rude for replying to a private email
in public.

Once again I am not interested in receiving any more solicitations via email
from your organization so please remove me from your mailing list. It's
rude to send unsolicitated spam email. It's rude to send mime email
attachments. It's rude to not respect reply-to settings. A lot of things
are rude not the least of which is to send email warnings to anyone who
happens to respond to some poster on a mail list who happens to be on some
organization's warning list or black list. So unless you have a response to
the content of my post on ruby-ML THEN DONT SEND ME ANY MORE FREAKING EMAIL.
I am simply not interested and will respond to it ON THE LIST..

Thank You
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top