From: MikkelFJ Date: 2001-08-11T18:43:32+09:00 Subject: [ruby-talk:19514] Re: the way class variables work "David Alan Black" wrote in message news:Pine.LNX.4.30.0108102207230.4103-100000@candle.superlink.net... > > Let me try. The key is that classes are objects too, and they have their Initially, this was also my thought. .... > But creating a new class does create a new instance of class Class. Yes, you have a point there. > Also, can it really be good, from the point of view of code > maintenance, for a child class to have the power to change its parent, > and all of that parent's other children, including future ones? > Doesn't that make things very unstable? I would seem so. On the other hand, I wasn't really surprised that your example behaved as it did - whether it is illogical or not. And Ruby has a lot of dynamic power that can be questioned from a maintainance point of view: You can't possible know what an object is, because some obscure corner of the code could have changed it. Therefore, your argument might not imly that the design is wrong. But maybe classes aren't really objects after all. They are metaobjects, and inheritance has a different meaning, where the entire family is an object. It does give me a headache to think about this conceptually, although the actual use is intuitive. Mikkel