Words
Factor handbook » The language

Prev:Collections
Next:Shuffle words


Words are the Factor equivalent of functions or procedures in other languages. Words are essentially named Quotations.

There are two ways of creating word definitions:
using parsing words at parse time.
using defining words at run time.

The latter is a more dynamic feature that can be used to implement code generation and such, and in fact parse time defining words are implemented in terms of run time defining words.

Types of words:
Colon definitions
Symbols
Word aliasing
Constants
Primitives

Advanced topics:
Deferred words and mutual recursion
Compiler declarations
Word introspection
Word properties

See also
Vocabularies, Vocabulary loader, Definitions, Printing definitions