From: Robert Klemme Date: 2009-10-12T02:55:20+09:00 Subject: Re: Class Level inheritable attributes - are we there yet? On 10/10/2009 08:59 PM, dreamcat four wrote: > The problem with class variables in Ruby, is that a class variable is > the same object across all subclasses of a class. This is in my > opinion almost never what you’d want. More probable is that you’d want > the individual class instance to have an accessor. (Remember classes > are objects in Ruby). Class variables are one of the few features I would elect for completely throwing out of the language since they are complex, can be error prone (initialization order matters) and use cases are rare (if existent at all). Having said that I am not sure that you actually need a language construct when you can do this: class A class < I'm not sure it's a common enough idiom to be worthy of a new > language construct, though. I love the fact that you can make what are > essentially language-level-like constructs from a few lines of code in > Ruby. I think that very, very few of them should be promoted to the > actual language. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/