Wednesday, February 2, 2011

The difference between classes & modules

From "Classes vs. Modules" ( http://bit.ly/eEMVtk )

"The main difference between classes and modules is that classes can be instantiated as objects while standard modules cannot. Because there is only one copy of a standard module's data, when one part of your program changes a public variable in a standard module, any other part of the program gets the same value if it then reads that variable. In contrast, object data exists separately for each instantiated object. Another difference is that unlike standard modules, classes can implement interfaces..."

No comments:

Post a Comment