From: "trans. (T. Onoma)" Date: 2005-01-17T23:10:53+09:00 Subject: Re: Fwd: [suby-ruby] Your all time desired fundemental Ruby mod On Monday 17 January 2005 08:20 am, David A. Black wrote: | Hi -- | | On Mon, 17 Jan 2005, trans. (T. Onoma) wrote: | > I generally agree with you. I wonder if @@vars could just become somesort | > of across the board initializer/accessor for instance vars (ie. @vars). | > | > class C | > @@a = 10 | > def a; @a; end | > end | > C.new.a #=> 10 | | Here you've got one object assigning to another object's instance | variables, which is not good. Except that class vars already do so in a sense in that they are accessable from both the class level and the instance level. But even so, that's not really what I meant. I'm actually with you on deprecating class vars, and was instead considering a completely alternate use for @@ notation to mean "default value of instance vars". This would address the issue in my other post about initialization of module's instance vars too, i.e. module M @@a = 10 def a; @a; end end class C include M end C.new.a #=> 10 But maybe you already understood this and still find it not good? T.