Namespaces
Every Pop source file begins with exactly one namespace declaration:
namespace Store.PaymentsA namespace gives declarations a stable, qualified home. Dots divide a name into components, so Store.Payments can live beside Store.Products and Store.Users.
Declarations in the same namespace can refer to one another by their short names:
namespace Geometry
public record Point x: Int y: Intend
public function origin(): Point return { x = 0, y = 0 }endThe namespace declaration is file-scoped. It is not a block and therefore has no matching end. A file cannot switch to a second namespace halfway through.
Qualified names
Section titled “Qualified names”Code can name a declaration through its full path when necessary:
local point: Geometry.Point = Geometry.origin()Qualified names are useful when two namespaces contain the same short declaration name or when a call site should make ownership especially clear.
Namespaces organize names at compile time. They do not create runtime objects and are not values that can be assigned to locals.
