This page describes the types of values used in Wyrd.
Note that {Integer}
and {Float}
are meant to represent the largest available
integer and float point value types available in the interpreter’s language.
This is not mandatory, but be especially wary of using too small a type for
{Integer}
, as the <State>
program_counter
value will need to be able to
be as big as there are instructions in the program.
Most of these types are trivially understood, as they directly map to the interpreter’s native equivalent.
<ListValue>
s store lists as {String}
to <Value>
maps. This is because
<PointerValue>
are lists of {String}
, and thus the address for a list’s
element will point to its index as a {String}
. The indices are simply the
what you would find in any list implementation, with "0"
being the first
element’s index, "1"
the second one’s, and so on.
<StructureValue>
s are similar to <ListValue>
s, except that in this case,
the {String}
indices are arbitrary and not just representing
numbers.