Metadata in MISC

Metadata is used in MISC by the interpreter for two main purposes. Firstly to store whether an object is data or not, and secondly to store the closure environment. Built-in functions like + do not store a closure environment but bootstrapped functions like and do.

MISC also makes use of metadata to store documentation for functions and code. The doc metadata key contains documentation for most functions. The getdoc function simply accesses this value. This metadata can be generated providing literate documentation built-in to the langauge. In-fact most of the examples in the documentation (displayed in [help2]) are generated using the example function.