require-when ( if then -- )
Factor handbook » The language » Vocabulary loader

Prev:require ( object -- )
Next:reload ( name -- )


Vocabulary
vocabs.loader

Inputs
ifa sequence of vocabulary specifiers
thena vocabulary specifier


Outputs
None

Word description
Loads the then vocabulary if it is not loaded and all of the if vocabulary is. If some of the if vocabularies are not loaded now, but they are later, then the then vocabulary will be loaded along with the final one.

Notes
This is used to express a joint dependency of vocabularies. If vocabularies a and b use code in vocabulary c to interact, then the following line, which can be placed in a or b, expresses the dependency.
{ "a" "b" } "c" require-when


Definition