๐ WAYPOINT LESSON
Checkpoint: The Generic Layer Cake
โญโญ intermediateโณ 26 min read๐ Lesson 120 of 225
Prove the whole stack: byte engine, stdlib wiring, and a typed facade โ one API, three layers.
The task
Implement g_sort and g_dedup (see the challenge). The facade macro
isort is given โ your engine beneath it must be correct for ANY
element type, and dedup must enforce its own precondition (sort
internally). This is the module's thesis in two functions: the
byte-level engine does the work, the type system lives in the callers.
Passing this proves you can write the layer C libraries actually ship: generic at the bottom, type-safe at the top, contracts in between.
Next module: the preprocessor โ macros as a language over the language.