Types Between Functional Pipeline Stages
The output of a pipeline stage must contain the representation and guarantees consumed by the next stage.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a mixed example
A reader emits lines. A parser emits typed measurements. A summarizer expects numbers, so passing the reader directly to it can cause string concatenation or conversion errors. Typed records make that intermediate state explicit.
Find the earliest type breach
Write an example input and expected output for each stage. A malformed field should be rejected by the component that owns that format. Staged parsing illustrates the relevant boundaries.[1]