- Joined
- Aug 15, 2012
- Messages
- 593
- Reaction score
- 247
- Primarily Uses
Okay, I don't know why the forums say I "like" your post, because I certainly never intended to perform that action and can't seem to find a way to undo it. So, for the record, this is not good advice.Finally, a Module is merely a container for one or more Classes.
Modules are not containers. In fact, it's generally bad programming advice in general to place code in "buckets" like many people (both inside and outside of the community) do. To put it simply, a Module is a Class that is not instanced. Modules have a plethora of uses, all of which are apparent as soon as you even begin looking into them, from inclusion to extension of objects to providing methods which are not tied to a single instance.
They are incredibly versatile and useful for a number of things. Besides, you can use a Class as a container just as easily as you'd use a Module. Try it if you don't believe me: it works exactly the same way.
