Chapter 1 Reuse Code at Compile Time (C and Python)

Resourceful Code Reuse — by Dmitry Zinoviev (10 / 20)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Running Example | TOC | Arranging Source and Header Files (the C W ay) 👉

Compile-time reuse is about organizing your program’s source code into potentially reusable and somewhat independent files, known as compilation units. Compile-time reuse is language-specific. In this chapter you’ll see two approaches: the C way (splitting your code into source and header files) and the Python way (creating modules). Let’s start with the C way, out of respect for the language’s age.

👈 Running Example | TOC | Arranging Source and Header Files (the C W ay) 👉

Resourceful Code Reuse by Dmitry Zinoviev can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.