Along with the table type, contexts are the flagship feature of Tabitha. It is through contexts, that Tabitha seeks to make the use of global data tenable in a large program. The basic idea, is that global data is stored in contexts, and any function that wishes to use this data must capture the context. This way, any bugs relating to a specific piece of data can be easily tracked down to a subset of all functions in the source code.
Contexts also remove the need for creating types which are only used once (think context types from C). Furthermore, thihs global data need not be passed around awkwardly from one procedure to another, but rather any procedure that needs the data can have it. While this level of global data access is often seen as an issue, it is circumvented by the requirement that functions must explicitly show that they can access this data via the capturing syntax.
A dump is similar to a context, except there are not as many restrictionso as to where its members can be used. These are envisioned to be convenient stores for constants, especially when writing API bindings.
Here is an example of a context:
context Data {
Int x
Float y
std::string msg
}
All a context is, is a static collection of dta. There is only one copy of this dataset in the entire program; contexts cannot be instanced.
For a function to read or modify data in a context, it must first capture said context. Here is an example:
function foo <Data> {
Data/x = 69
Data/msg = "Hello"
}