On Jun 19, 2011, at 7:20 PM, Ryan Davis wrote:

> Global variables are just that... global. There's no two ways about it.
> 
> Class variables are shared amongst a tree... but WHERE in the tree is defined by where it is initialized.

This does not explain why they do not auto-initialize to nil like all
other shared variable types.

> And for the record, I think that your assertion that class variables "are almost always wrong" is false. Like all things in software design, they can be used poorly or they can be used well. When they're used well, they're perfect for the job. When they're not, they're horrible. I use class variables all the time to good effect (some of these are from Eric):

I think you support my point - for an entire variable class type, I see
about 20 projects there, some of which you've admittedly not written
yourself. They certainly have uses; I use them in Laser for dynamically
loaded warning passes, and I see many of the projects you link use them
for plugins. "Almost always wrong" isn't countered by fewer than 2 dozen
projects that use them once or twice.

Michael Edgar
adgar / carboni.ca