Fate Language (Version 1) Documentation
When using Tonkadur, Fate is the language the author writes in. This language is
meant to provide the writer with as many tools as possible, so that they do not
feel constrained by the limitations of the language, nor find writing complex
narratives tedious.
To write in Fate, simply open your favorite text editor and create a new file
that starts with the following line:
(fate_version 1)
Before going any further into the documentation, you should familiarize yourself
with the notations.
Fate files are composed of three types of constructs:
- Computations, operations that do not modify the
memory and return a value.
- Instructions, constructs that can modify the memory
but do not return any values.
- Declarations, special instructions that are
performed during compilation instead of during the execution.
Other concepts in Fate include:
- Variables: named memory element.
- Types: every memory element is assigned a
specific type. Fate uses static and strong typing, meaning that types are
determined at compilation time and typing
- Procedures/Sequences: named list of
instructions, which can take parameters.
- Lambda Functions: computations
which are not performed immediately but are instead stored for future use.
- Addresses/Pointers: value that
corresponds to a memory element (not to be confused with the value of that
memory element).
- Conditionals: selection of
computations or
instructions depending on a
computation.
- Loops: repetition of instructions controlled
by computations.
- Choices: prompt the user to select an
option.