$NAMESPACE app :: messages     # blanks around :: are allowed
$NAMESPACE                     # the global namespace

The name is a qualified name. The last $NAMESPACE in the file (including imported files) is the one used.

Semantics: Reference › $NAMESPACE.