module vs class

  • Thread starter Thread starter Raymond Lewallen
  • Start date Start date
R

Raymond Lewallen

Whats the difference in using a module with all public functions versus
using a class with all shared functions and a private constructor?

Raymond Lewallen
Federal Aviation Administration
 
Raymond,
Whats the difference in using a module with all public functions versus
using a class with all shared functions and a private constructor?

In practice it's hardly any difference.

With a private constructor the class can still be instantiated from
within the class itself. A module can never be instantiated since it
doesn't have any instance constructor, not even a private one.



Mattias
 
Back
Top