Hi --

On Wed, 9 Jun 2004, David Garamond wrote:

> nobu.nokada / softhome.net wrote:
> > At Wed, 9 Jun 2004 13:10:52 +0900,
> > David Garamond wrote in [ruby-talk:102895]:
> > 
> >>I know there might be some cases where you want to share your class vars 
> >>with the subclasses, but I usually want a per-class class variables.
> >>
> >>I believe this will change in Ruby2.
> > 
> > It was changed in 1.9.
> 
> Thanks, Nobu. I'd love to use it now though :-)
> 
> What will be the difference between class instance var (@var) and @@var?

I think it will be the same fundamental difference as now: instance
vars are visible only when their owner is 'self', whereas class
variables are visible inside instance method definitions (when 'self'
is not the class or module object).  Just minus the per-hierarchy
thing.  <editorial>I wish Matz had chosen something other than '@@'
for class variables, since it often generates the impression that
they're somehow akin to instance variables.</editorial>


David

-- 
David A. Black
dblack / wobblini.net