Bird

Namespaces

Namespaces allow you to encapsulate a group of declarative statements. Statements that can be created in namespaces include variable declarations, structs, types, functions, and other namespaces.

Namespace Creation

To create a namespace, use the namespace keyword followed by the namespace identifier followed by a block of namespace statements.

Accessing Namespace Statements

To access the identifiers created within a namespace, you must use a prefix before the identifier. This prefix uses the :: operator to sepparate the namespace from the identifer. Additionally, if an identifer is within a doubly nested namespace, you will need to specify each namespace layer.

Still here?

Check out the playground!