From: Robert Dober Date: 2007-04-30T14:51:54+09:00 Subject: Re: Class Level Variables On 4/30/07, Gregory Brown wrote: > On 4/29/07, Ari Brown wrote: > > > > On Apr 29, 2007, at 9:03 PM, Gregory Brown wrote: > > > > > > > Please don't do this. That assignment would happen every time you > > > create an instance of the object, which completely defeats the purpose > > > of class level variables. (Whether you use class instance variables or > > > class variables). > > > > So use @@foo for general ideas (like @@foo = {} and when used in some > > file.open(path, 'r') do ..... command) and @foo for variables that > > hold specific values? > > Don't use @@foo, ever. Unless you know *why* you want to. They add > unnecessary confusion. Instead, use class instance variables. Could not agree more with you, however, I would not dare stating this as a *General Rule of Conduct*. Will @@class_iv go away? I do not think so. Cheers Robert > > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw