Jump to ratings and reviews
Rate this book

C interface implementation

Rate this book
C interface implementationEvery programmer and software project manager must be familiar with the techniques for creating reusable software modules, since they are the ones that make up some of the large, stable applications. Unlike modern object-oriented programming languages, C provides little or no language or conceptual interface (API) for application reuse. Many C programmers have implemented APIs and libraries to work only with their own applications, so there are relatively few programmers who create and distribute widely available APIs. This book describes how to create reusable APIs using a programming language-independent methodology that separates implementation from interface-based design and interface design. The authors of this book have detailed descriptions of the 24 interfaces and implementations to help readers fully understand the design techniques.

Paperback

First published August 30, 1996

20 people are currently reading
334 people want to read

About the author

David R. Hanson

5 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
34 (45%)
4 stars
28 (37%)
3 stars
5 (6%)
2 stars
6 (8%)
1 star
2 (2%)
Displaying 1 - 4 of 4 reviews
Profile Image for David Lindelof.
44 reviews20 followers
March 21, 2012
Easily one the top three books on C that I know about. The author builds what amounts to a "Commons" library of code for C, and does this step by step, explaining every single detail through the use of Literate Programming. It's almost like sitting next to a master programmer as he explains what he's doing, the rationale behind every single decision.

On the downside, it does tend to become a little bit repetitive at times, especially when similar methods are written for different modules, such as, say, put()-like operations for stacks, sets and/or rings.

Nevertheless, this book is a must-read for any C programmer who claims to take his craft seriously. The last chapter on implementing threads is worth the book's price alone.
Profile Image for Liquidlasagna.
2,962 reviews107 followers
February 8, 2022
Probably the best advanced C book in existance...

Clearly written and well organized, this book presents more than 20 highly useful library interfaces for containers, string management, mathematics, and memory management. There isn't a line of code in the whole book that you couldn't take and use, verbatim, in a project today, after reading this book, you'll probably never have a compelling reason to write a string library or a hash table interface again.

More importantly, though, each example library illustrates ways to effectively design consistant and useable library interfaces, from generic ADTs to system service wrappers. After reading this book, you'll not only have an arsenal of useful code to leverage, but also a good understanding of how to design clean, modular, reuseable components for your application.

Hanson's C code is extremely clear and concise. Even if you've been programming professionally for a long time, you are likely to pick up a useful technique or two just by reading the source code in the book. If you're not very experienced, you will learn about C programming idioms that will be valuable to you in future work.

I really like how this book, and Hanson's other book 'A Retargetable C Compiler: Design and Implementation' are put together. Hanson employs Literate Programming techniques to weave the code he's discussing together with his discussion. This makes it very simple to track what portions of the code are being talked about at any point.

tqbf San Francisco
Profile Image for David.
259 reviews31 followers
March 24, 2008
This book is an example of literate programming a la Knuth: each chapter discusses some library and also provides a complete implementation of that library. Includes, among other things, implementations of: a pool-based low-level memory manager; a thread system; extended and arbitrary arithmetic; and throw/catch style exception handling. I remember learning a lot of little C tricks from this book, and I'd like to think that some of the design lessons have influenced me as well.
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.