Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ETYMOLOGY] - Sterile Classes / Sterile Meta Classes

Reply
Thread Tools

[ETYMOLOGY] - Sterile Classes / Sterile Meta Classes

 
 
Ilias Lazaridis
Guest
Posts: n/a
 
      05-07-2005
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
 
Reply With Quote
 
 
 
 
Saynatkari
Guest
Posts: n/a
 
      05-07-2005

Le 7/5/2005, "Ilias Lazaridis" <(E-Mail Removed)> blathered:
[snipped]

I wholeheartedly encourage you to find out more about sterilization.

E

--
template<typename duck>
void quack(duck& d) { d.quack(); }



 
Reply With Quote
 
 
 
 
Logan Capaldo
Guest
Posts: n/a
 
      05-07-2005
On 5/7/05, Ilias Lazaridis <(E-Mail Removed)> wrote:
[...]
> * It cannot be instantiated.

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


Regarding SCs (heh, one acronym fits your terminology and the current
terminology) not having instances, while not present in Ruby their is
the idea of the <a
href="http://c2.com/cgi/wiki?AbstractClass">abstract class</a>, (seen
only in C++ AFAIK, although Java's interfaces are similiar in some
respects) which has no instances. This doesn't (debately) make it less
of a class however. Plus one can consider an instance to be some state
(represented by instance variables) and a pointer to the instatiated
classes method lookup table (not sure of the right terminology here).
Then one would would have to consider the instance to be the object
that the SC is an SC of.



 
Reply With Quote
 
Bill Atkins
Guest
Posts: n/a
 
      05-07-2005
------=_Part_5541_18823251.1115502852076
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

You are my hero.

On 5/7/05, Saynatkari <(E-Mail Removed)> wrote:
>=20
>=20
> Le 7/5/2005, "Ilias Lazaridis" <(E-Mail Removed)> blathered:
> [snipped]
>=20
> I wholeheartedly encourage you to find out more about sterilization.
>=20
> E
>=20
> --
> template<typename duck>
> void quack(duck& d) { d.quack(); }
>=20
>=20



--=20
Bill Atkins

------=_Part_5541_18823251.1115502852076--


 
Reply With Quote
 
Jon A. Lambert
Guest
Posts: n/a
 
      05-07-2005
Saynatkari wrote:
> Le 7/5/2005, "Ilias Lazaridis" <(E-Mail Removed)> blathered:
> [snipped]
>
> I wholeheartedly encourage you to find out more about sterilization.
>


It depends on whether this has a double meaning. Has science discovered a
troll gene? Nature or nurture?
As you might guess I lean towards the nurture side.

On the other meaning...
In the ColdC language, well ColdCore library to be more specific, objects
that are "spawnable" have a "fertile" attribute attached to them. There's
no such thing as a "class" though, just pure objects. Spawned objects
inherit from their parents, while "cloned" objects are siblings in the
inheritance tree. The absence of the "fertile" symbol is similar to Java's
'final'.

--
J Lambert







 
Reply With Quote
 
Nikolai Weibull
Guest
Posts: n/a
 
      05-07-2005
Ilias Lazaridis, May 8:

[blah]

What does this have to do with etymology? I don't think you know what
the word "etymology" means. Please refrain from using terms
incorrectly in the future. Thanks,
nikolai

--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


 
Reply With Quote
 
Jon A. Lambert
Guest
Posts: n/a
 
      05-08-2005
Nikolai Weibull wrote:
> Ilias Lazaridis, May 8:
>
> [blah]
>
> What does this have to do with etymology? I don't think you know what
> the word "etymology" means. Please refrain from using terms
> incorrectly in the future. Thanks,
> nikolai



Mmm... chewy etyms

singleton - an unmarried unattached person - circa 1930's
singleton also refers to a single card of a suit in one's dealt hand in
whist - 1876
single - Old French - sengle "one, separate" - 1300's
Latin singulus "one individual, separate"
Latin diminutive of sim- (stem of simplus) - "simple"
related to simpleton - which brings us full circle and back to Ilias
Lazardis - 2005



--
J Lambert



 
Reply With Quote
 
Yukihiro Matsumoto
Guest
Posts: n/a
 
      05-08-2005
In message "Re: [ETYMOLOGY] - Sterile Classes / Sterile Meta Classes"
on Sun, 8 May 2005 06:14:28 +0900, Ilias Lazaridis <(E-Mail Removed)> writes:

|Another suggestion for the "Ruby Singleton Classes" or "Exclusive Classes":
|
|Sterile Classes

Sterile means "Not producing or incapable of producing offspring",
right? The word suggest the (class-like) object cannot create its
instances. But this is not the only class-like object in Ruby that
can not (or should not) create its instances, for example, modules in
Ruby are class-like objects which are not capable to instantiate.
Abstract classes as well are classes not supposed to create their
direct instances.

Being hidden from observable object model is not important neither.
In the new model, it would not be hidden any more, and perhaps, there
will be a method to retrieve "singleton class" from an object. I hope
the method name would not be Object#singleton_class.

I'd like to emphasize the "per-object" attribute of the object.
Ideally, the term should be "xxxx class" where

* xxxx describe the class is per-object.
* xxxx is an adjective, or a noun that can be used like adjective.
* we can call methods now we call "singleton methods" as xxxx
methods for consistency.

In this standard, "singleton" is the best I can think of, unless name
conflict. Sad coincidence.

matz.


 
Reply With Quote
 
Ilias Lazaridis
Guest
Posts: n/a
 
      05-08-2005
Logan Capaldo wrote:
> On 5/7/05, Ilias Lazaridis <(E-Mail Removed)> wrote:
> [...]
>
>> * It cannot be instantiated.

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

>
> Regarding SCs (heh, one acronym fits your terminology and the current
> terminology) not having instances, while not present in Ruby their is
> the idea of the <a
> href="http://c2.com/cgi/wiki?AbstractClass">abstract class</a>, (seen
> only in C++ AFAIK, although Java's interfaces are similiar in some
> respects) which has no instances.


yes, you are right.

there's a collision.

But possibly the term "Abstract Class" is the foundation for a solution.

Dynamic Abstract Class.

> This doesn't (debately) make it less
> of a class however. Plus one can consider an instance to be some state
> (represented by instance variables) and a pointer to the instatiated
> classes method lookup table (not sure of the right terminology here).
> Then one would would have to consider the instance to be the object
> that the SC is an SC of.


I do not understand exactly.

but the essence is in the above about "abstract".

..

--
http://lazaridis.com
 
Reply With Quote
 
Bill Guindon
Guest
Posts: n/a
 
      05-08-2005
On 5/8/05, Yukihiro Matsumoto <(E-Mail Removed)> wrote:
> In message "Re: [ETYMOLOGY] - Sterile Classes / Sterile Meta Classes"
> on Sun, 8 May 2005 06:14:28 +0900, Ilias Lazaridis <(E-Mail Removed)> writes:
>
> |Another suggestion for the "Ruby Singleton Classes" or "Exclusive Classes":
> |
> |Sterile Classes
>
> Sterile means "Not producing or incapable of producing offspring",
> right? The word suggest the (class-like) object cannot create its
> instances. But this is not the only class-like object in Ruby that
> can not (or should not) create its instances, for example, modules in
> Ruby are class-like objects which are not capable to instantiate.
> Abstract classes as well are classes not supposed to create their
> direct instances.
>
> Being hidden from observable object model is not important neither.
> In the new model, it would not be hidden any more, and perhaps, there
> will be a method to retrieve "singleton class" from an object. I hope
> the method name would not be Object#singleton_class.
>
> I'd like to emphasize the "per-object" attribute of the object.
> Ideally, the term should be "xxxx class" where
>
> * xxxx describe the class is per-object.
> * xxxx is an adjective, or a noun that can be used like adjective.
> * we can call methods now we call "singleton methods" as xxxx
> methods for consistency.


unique, lone, solo, distinct, specific, custom, customized, changed,
expanded, crafted, decorated, tailored, adapted, adjusted,
transformed, modified.

any of these come close?

> In this standard, "singleton" is the best I can think of, unless name
> conflict. Sad coincidence.
>
> matz.
>
>



--
Bill Guindon (aka aGorilla)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Henry's Outlet store very "sterile" RichA Digital Photography 12 04-03-2010 03:45 PM
A sterile class? Victor Bazarov C++ 11 08-11-2007 12:38 PM
Meta methods to govern meta data? Duane Johnson Ruby 6 10-28-2005 03:57 AM
LCD monitors: crisp but sterile looking J. Tyler Digital Photography 75 12-13-2003 05:31 PM
META NAME and META HTTP-EQUIV Nym Pseudo HTML 1 09-26-2003 09:13 AM



Advertisments