Checkpoint: Parsing Untrusted Input
intermediate24 min readLesson 108 of 148
Prove the full discipline: bounded tokenization, character-set validation, range checks, no mutation.
The task
Implement csv_parse (see the challenge) for the strict format
name,age,score. This is the module's whole argument in one function:
spans instead of mutation, digit-by-digit numeric validation instead of
atoi, range checks against your domain, and rejection as the default.
Passing this proves you can take input you do not control and turn it into values you can trust — the boundary every real program lives at.
Next module: linked data structures — nodes, ownership, and the free- exactly-once discipline.