Expression Pattern Language (eXPL)

Qualified Names

Two-part identifiers have been mentioned in passing where there is a reference made from one context to something contained in a different context. For example, on the topic of expressions, it was stated "A variable declared within a template is accessed from another template by using a two-part name, the first part being the template name and the second part being the variable name eg. account.name".

To get an understanding of how naming works in eXPL, discussion must move on to the concept of "qualified name" which allows all script components to be uniquely identified. There is a QualifiedName type used by the compiler for component identification and the names that occur in script, both one-part and two-part, are all mapped by the compiler to qualified names.

Anatomy of a qualified name

A qualified name has 3 text parts:

  1. scope
  2. template
  3. name

Name is never empty, but one or both of the remaining names may be empty depending on context:

  • The global scope is indicated by setting the scope part empty.
  • The template is empty for variables and lists in the global scope and for axiom declarations. This means an axiom name must be unique within a particular scope.

Visibility

The existence of scope and template parts of a qualified name allow the same name to be used for different components in different contexts. In this case, it is possible to distinguish between components using two or even three-part names. Note that the global scope name is "global", though good selection of global names should make unnecessary the use of the explicit global scope name.