Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion - Sterile Classes / Sterile Meta Classes
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ilias Lazaridis  
View profile  
 More options May 7 2005, 5:12 pm
Newsgroups: comp.lang.ruby
From: Ilias Lazaridis <il...@lazaridis.com>
Date: Sun, 08 May 2005 00:12:24 +0300
Local: Sat, May 7 2005 5:12 pm
Subject: [ETYMOLOGY] - Sterile Classes / Sterile Meta Classes
Another suggestion for the "Ruby Singleton Classes" or "Exclusive Classes":

Sterile Classes

Class:   keeps structure and behaviour
Sterile: cannot create ( instances / objects )

The Term is currently unassigned:

http://www.google.com/search?q=sterile+classes

-

Concept of a "Sterile Class":

A Sterile Class is a Class, with all the abilities of the languages
Classes, exept:

  * It cannot be instantiated.
  * It is not part of the observable object-model

In Ruby, Sterile Classes are used to change the behaviour of _one_ object.

The Sterile Class
  * becomes _not_ part of the observable inheritance-chain.
    * e.g.: cannot be reached via
      obj.class,
      obj.superclass,
      obj.instance_of [...]
  * _becomes_ part of the non-observable inheritance-chain.
    * e.g.: method-resolution looks _first_ at the "Sterile Class"
      * internal implementation

[Thus, "Pseudo Class" would be possibly a right term, too - but already
used within CSS domain]

-

please look at the 1.3 version of the Diagramm:

http://lazaridis.com/case/lang/ruby/

"john" has an "Exclusive Sterile Class"
"john" is an instance of "Talker"
"john" has _no_ observable relation to its "Exclusive Sterile Class"

[observable via OOAD]

=> "[Exclusive] Sterile Class"
=> "Sterile Class"

-

"Talker" has an "Sterile Class" (Class:Talker)
"Class:Talker" keeps the structure and behaviour of class Talker.
thus "Class:Talker" is the "MetaClass" of class Talker.
=> MetaClass

but Talker is an instance of class "Class".
the MetaClass "Class:Talker" has no instances.

=> "Sterile Meta Class"

-

The terminology depends finally on the further development direction of
Ruby.

If it is planned to make the object model more OO like, and to implement
_real_ metaclasses, then it would be enouth to say:

"Attention: In the current implementation, a Ruby MetaClass is based on
"Sterile Classes".  Although they describe structure and behaviour of a
Class, they do not instantiate those classes. They are _not_ part of the
inheritance-tree and thus _not_ part of the object-model. That's why the
documentation referes them as "Sterile Meta Classes" "

.

--
http://lazaridis.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.