Measure · Understand

Slot & SlotVector

A slot is one lens's typed output for an input, held as a SlotVector that may be Dense, Sparse, Multi, or Absent. Slots are the typed cells a constellation is built from.

A lens is asked to measure an input it has no opinion about — say, a "code-style" lens looking at a sunset photo. What should its slot hold?

A lens is asked to measure an input it has no opinion about — say, a "code-style" lens looking at a sunset photo. What should its slot hold?

Absent. A SlotVector can be Dense, Sparse, Multi, or Absent — and "Absent" is a first-class, honest value meaning "this lens has nothing to say here." That honesty (rather than faking a vector) is what lets later verbs trust the slots and is a small instance of the fail-closed habit.

One lens, one typed cell

Run an input through a single lens and you get a slot — that lens’s typed output for that input. The value it holds is a SlotVector, and it is typed, because not every lens produces the same kind of answer:

Why typing the cell matters

Calling a no-opinion result Absent instead of forcing a fake vector is the same discipline as fail-closed: say “I don’t know” rather than bluff. Keeping the type of each slot means later verbs — counting agreement, differentiating signal — operate on real structure, not on a number that pretends to be one.

Slots are the cells. Arrange one input’s slots across every lens in the panel and you have a constellation: the native Calyx record.

Practise to master it

Where this sits in the concept graph

Graph node C3 · tier F · target level Understand.

Build on first

Leads next

Related

Sources