Checkpoint: The Ownership Seam
intermediate26 min readLesson 116 of 148
Prove you can build a hash table that OWNS its keys and frees every byte exactly once.
The task
Implement WF (see the challenge): a word-frequency table that strdups
its keys, counts occurrences, hands out lookups into its own storage,
and destroys everything it owns. This is the module's whole lesson in
one structure: hashing, chaining, and the ownership seam — the table
owns its keys, the tests verify the copies are distinct, and destroy
frees every node and every key exactly once.
Passing this proves you can ship a generic container whose ownership policy is explicit and whose cleanup is provable — the bar every real library must clear.
Next module: the preprocessor — macros as a language over the language.