Using declarations
Este conteúdo não está disponível em sua língua ainda.
A using declaration lets a file refer to visible declarations from another namespace by their short names:
namespace Application
using Geometry
function makeOrigin(): Point return origin()endusing affects name resolution only. It does not load a file at runtime or execute initialization code.
Namespace aliases
Section titled “Namespace aliases”Give a namespace a shorter or more distinctive local name with =:
namespace Application
using Geo = Company.Project.Geometry
function makeOrigin(): Geo.Point return Geo.origin()endAn alias is especially helpful for long qualified names and collisions.
If multiple imported namespaces expose the same short name, Pop reports an ambiguity rather than silently choosing one. Resolve it by using a full qualified name or an alias.
Only declarations visible from the current Bubble can be reached through using; importing a namespace does not bypass private or internal access.
