Core Reference
Built-in types and associated functions in the Swamp language
This section documents the built-in types and their associated functions that are part of the Swamp core language.
Numeric Types
Collections
Sequential Collections
-
Sequential — Common interface for sequential
-
String — String functions. Is represented as an array of
U8. -
Vec — Dynamic array (vector)
-
Grid — Two-dimensional array as a flat sequential internally
-
Stack — Last-in-first-out (LIFO) stack
-
Bag — Unordered collection with O(1) removal
-
Pool — Object pool for reusable resources
Circular Collections
- Wrap — Common interface for circular
- Queue — First-in-first-out (FIFO) queue
- Ring — Overwriting Circular buffer
Lookup Collection
- Map — Key-value map
Special Collection
- Block — Fixed-size contiguous memory block, no header or meta data. only indexing (subscript) support.
Built-In Functions
- Other — Output, debugging, and logging functions
Compiler Directives
- Attributes — Metadata annotations for declarations