Skip to content

Direction

The direction of data is the direction of the references that a construct permits. Three shapes cover the languages that coeval serves.

The glyphs so far: 15, 3 new on this page
  • 42Data: a value without a type
  • number
    42
    A document: the tab is its type
  • number
    42
    A dashed tab: the container declares the type
  • add
    number
    1
    number
    2
    Parts: a card inside a card
  • kindA kind: a document of type kind
  • OKDA rung: own, kind or default
  • 3A port: the result of a document
  • 0A sealed part: an evaluator cannot read it
  • #NAME?An error value, in a red port
  • numbera
    3
    A name tag: a binding for later steps
  • ref
    namesa
    A reference: a path from a root of the context
  • if
    test
    bool
    true
    true
    then
    text
    “yes”
    “yes”
    else
    text
    “no”
    not evaluated
    “yes”
    Not evaluated: a part that its parent did not need
  • ▸log
    text
    “hi”
    “hi”
    “hi”
    The run side: a magenta edge, and an effectnew
  • 1log“hi”An effect: a numbered ticket in the worldnew
  • logA capability: an effect that a term can causenew
seq
  1. 1
    adda
    number
    1
    1
    number
    2
    2
    3
  2. 2
    multiplyb
    ref
    no path
    #VALUE!
    number
    10
    10
    #VALUE!
  3. 3
    ▸log
    ref
    no path
    not evaluated
    not evaluated
  4. 4
    addc
    ref
    no path
    not evaluated
    ref
    no path
    not evaluated
    not evaluated
#VALUE!

What step 4 can name

It can name a, b. No named step comes after it.

Select a step. Each dashed arrow goes back from a reference to the step that gives its name.

In a sequence, a step reads back. It can name each earlier step, and it cannot name a later step.

A step of a sequence can name each earlier step. It cannot name a later step. This is the scope of let*: each binding sees the bindings before it.

A formula over a structure reads by position. It starts at a focus and moves: to the parent, to the children, to the siblings or to all of the others. A spreadsheet reads cells in the same way.

In a tree of components, data and the box of a parent go down. The size of a child and its events go up. A reference goes sideways, to another branch. The theory of attribute grammars names these inherited, synthesized and reference attributes.

A name is also a position. A variable is a path up the program to the place of its binding. The previous step is a path to the sibling before. Thus one grammar of paths can name all three shapes. A path is a list of moves from the place of the reference.