From: "David A. Black" Date: 2009-12-22T20:08:43+09:00 Subject: Re: special cased? Hi -- On Sun, 20 Dec 2009, Roger Pack wrote: > >> Class variables are a very strange beast with bizarre semantics. I would >> avoid them if I were you. > > Yeah they must be special cased so that beginning users can use them > with abandon and it will "just work." See this, from Matz: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/347355 especially: (3) and lastly, and most importantly, do not use class variables, unless you really really need them; they are fundamentally global variables. That's the thing; they're really hierarchy globals, but confusingly similar to instance variables (of which they are essentially the opposite) in appearance. David -- David A. Black Senior Developer, Cyrus Innovation Inc. THE COMPLEAT RUBYIST, Ruby training with Black/Brown/McAnally! January 22-23, Tampa, Florida Info and registration at http://www.thecompleatrubyist.com