Iota Data Model
At the beginning is text, a sequence of Unicode code points. It is shapeless and unstructured.
Let's define basic structure on top of it, called Iota Data Model
iod concepts
Atomic entities are:
- numbers (TODO: unbounded
nat
ori64
orf64
or genericu N
/i <N>
?) - strings: sequences of Unicode code points
- symbols: strings usable as names.
Pairs are <key> = <value>
where <key>
/<value>
are any other entities (atomic or compound).
Maps are sets of pairs. They are generally unordered (? - although there are situations where ordering of keys matter). Keys are not required to be unique, the last one "wins". Keys can be explicit or implicitly assigned to autoincrementing numbers (?) or special symbols like $0
, $1
, ...(?).
Lists are ordered sets of entities as well: []
, [a]
, [a, b]
.
- unlike tuples,
[a]
is not equal toa
.
Tuples are ordered sets of entities: ()
, (a, b
), (a, b, c)
, ...
()
is an empty tuple,unit
in FP-speek.(<entity>)
is a singleton tuple, it's equivalent to<entity>
.
Chains are ordered sequences of values: a b c
. They are more like lists in FP, and can be iterated on.
Lookups are dot-separated sequences of entities, usually representing hierarchical access in nested maps.
Metadata, tags, annotations (TODO: choose one name): a : t
TODO: choice (|
).