Play@Work

Tuesday, January 25, 2005

Statics ? Bad

Ohhhh .. I get it ..
Statics kind of reduce the object orientedness of an Object oriented design.

"static object references and methods are not elements of pure object-orientation, but they are often required for practical, convenience and speed reasons"

a nice article on Statics and Singletons. Somethings I had never thought of before
- A Static is not a reusable entity. Hence it is not garbage collected. So we have to make sure our static classes are not Resource Hogs !!!
- Static variable are lost when they are serialized

0 Comments:

Post a Comment

<< Home