Fork me on GitHub
Yes, you would use instance variables more often. There are few good reasons to use class variables. One good one is that metaclasses will set class level variables that the author is not necessarily aware of, meaning they gain some security through obscurity.

I believe this practice might be habits from people who knew Java first, but I am not sure yet.

PS. I have disqus installed on j2labs.tumblr.com.

Yes, you would use instance variables more often. There are few good reasons to use class variables. One good one is that metaclasses will set class level variables that the author is not necessarily aware of, meaning they gain some security through obscurity.

I believe this practice might be habits from people who knew Java first, but I am not sure yet.

PS. I have disqus installed on j2labs.tumblr.com.

See more
Posted at 2:29 PM 03 March 2012
Bookmark and Share