Qualified declarations
Vala does support qualified access using the global::
prefix. When adding the global::
prefix to the name of a symbol declaration, it is parsed without any warning (at least for classes, namespaces, methods), but is completely ignored.
We should either forbid global::
prefix on declarations, or actively support it.
While usecases for qualified declarations are probably limited, there would be at least a few: For example we could get rid of the rule to accept main()
in any namespace, instead ask developers to implement main()
as global::main()
if they want to implement it outside the root namespace. Qualified declarations could also become useful for Kotlin-style extension functions.