Fabl interprets unqualified global and function names (that is, identifiers which do not include ":") by searching a sequence of resources called the path . (The path plays a role in Fabl similar to the role of the path in Unix or Windows shell programming).
The path is of type SeqOf(Resource). The function,
void pathPush(Resource rsr)
is used to add a resource to the path. The variant,
void push(id ns)
is equivalent to pathPush(namespace(ns)). The following example illustrates the use of push
setHome('ex');
var abc = 22;
lastHome();
abc;
--> ERROR: Unknown symbol:abc
//now add ex:home1 to the path
push('ex');
abc;
--> 22
The path is also used for looking up functions.
Each home has its own path property. setHome(x) initializes the path for x if it is not already present. This initial path contains the namespaces fabl and fimp, as well x itself. This means that the classes, properties, and functions making up the Fabl implementation are available without use of qualified names.