DELAPARRA
Index
Color
NL
Category: Programming paradigms

Chunk

Explained by Updated

What is Chunk?

Chunk: A named, embeddable block of code within the narrative, referenced and combined to build the full program. In literate programming, a chunk is a named piece of code embedded in a document written mainly for people. The document explains the program in a logical order, and chunks are referenced and combined to produce the actual source files.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Chunk

How is Chunk used in practice?

The idea, introduced by Donald Knuth, is that code should be presented in the order that best explains it, not the order a compiler needs. A tool then extracts the chunks and stitches them together.

What should you keep in mind with Chunk?

Full literate programming is rare in everyday development, but its spirit lives on. Jupyter notebooks mix explanation and runnable code, and documentation tools that pull real code snippets from a repository keep examples accurate. When you write a guide or a README, showing small, named pieces of code with clear explanations follows the same principle.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with C

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.