Comment on page

Namespace

A namespace is a scope, not even a glorified scope, just a plain scope assigned to a variable. What are the uses of namespaces? Namespaces are useful to avoid cluttering the parent scope and can be used where a class is not applicable. Some examples of namespace usage in the standard library includes:
  • Math, which stores constants and useful functions
  • IO, which stores I/O functions and constants