Structures are simple fixed-length sets of named values, corresponding to "records" in Pascal or "structs" in C.
Like vectors, they are intended to provide a simple, flexible, space-efficient component from which muf programmers may build custom datastructures of various sorts, and contain an absolute minimum of overhead (a pointer identifying its owner, plus a pointer to the structure definition), and hence provide a minimum of functionality.
Since structures are subject to side-effects, they are compared by address rather than by contents.
As an efficiency hack, it is possible to allocate structures on the stack rather than on the heap. Doing so avoids the need to garbage-collect them, and fits naturally into the paradigm of some languages like C; It again introduces the danger of the structure being recycled while references to it remain, and in the Muq implementation restricts access to the structure to the job creating the vector.
Go to the first, previous, next, last section, table of contents.