----- Original Message ----- 
From: "Yukihiro Matsumoto" <matz / ruby-lang.org>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Thursday, August 21, 2003 1:47 PM
Subject: Re: Class variables - a surprising result


> Hi,
> 
> In message "Re: Class variables - a surprising result"
>     on 03/08/22, "Bennett, Patrick" <Patrick.Bennett / inin.com> writes:
> 
> |In most languages (C++, Java, Delphi, etc.), class variables (static's)
> |are scoped by the *class*, not the entire inheritance chain.
> 
> As far as I know, C++ and Java do not have class variables.  They have
> static member variables, which can be either private, protected, or
> public.  I know nothing about Delphi.

eyebrow.raise

This is interesting, because I would have said, "Those are class
variables, they just don't CALL them that."

I learned OOP from Eiffel (Meyer's OOSC book) -- just the terminology 
and concepts, I never actually coded in Eiffel.

Don't I recall hearing that Ruby's class variables are based on those 
of Smalltalk? (I don't know Smalltalk.)

If so, maybe the confusion is just related to mildly differing
flavors of OOP. 

For the record, I have always been confused by Ruby's class variables
also, thinking that they should belong to the class and not the
hierarchy.

Hal