Module
- Modules cannot be instantiated as classes.
- Create namespace and group things together.
Places where modules can be used.#
- NameSpace
- Grouping things together.
Makes mixins possible, thus removes the need for multiple inheritance.
Place to store stateless helpers
Helpers, Maths
Modules are a way of grouping together methods, classes, and constants.
Module constants are named just like class constants, with an initial uppercase letter.
There are times when you want to group things together that don't naturally form a class. Use modules in those cases.