Y Hacker News Books
Buy on Amazon3.8 out of 5, 59 ratings on Amazon

#180 of 2,629 all-time

C Interfaces and Implementations

David Hanson

32 people recommended it in 8 threads, 2010–2022.

8 commenters pushed back on it — worth reading the threads.

What people on Hacker News said

lackbeard
C Interfaces and Implementations - Great examples of good API design and how to build clean modular code.

on HN, 2017

jll29
The second book is a true gem that teaches even seasoned programmers how to implement correct, clean and portable components as libraries in ISO C, with plenty of source code to show how the true masters of the language craft the finest code you can in C.

on HN, 2022

rramadass
The data structures/algorithms given in Hanson's book are "industrial strength" with no missing parts (i.e. no exercise left to the reader).

on HN, 2022

sfpotter
If you are new to C and don't know how to manage complexity by building up useful interfaces for your data structures, reading Hanson's book is a reasonable way to get some ideas.

on HN, 2022

And on Amazon

The best C programming book I have EVER seen, hands down.

I don't normally leave reviews, but I cannot believe how good this book really is. I'm a power C++20 developer who recently has become fascinated with cross-language interoperability and as such have sought to build my own C runtime framework and utility library from scratch (libGimbal), influenced by GLib's GObject and Microsoft COM. I've personally implemented my own C17-based versions of C++'s containers, standard algorithms, multiple types of custom strings, custom allocators, and a meta type system providing uniform object representation across languages. …

Falco Girgis · verified purchase · 5/5

An embedded developer point of view

A very good book also for the embedded field; you can't use much of the code in small 8bit microcontroller environments, but if you work with bigger 16/32bit microcontrollers many of the abstract data types (ADTs) described here can be useful. Maybe the "threads" interface can even be used as a base to develop a tiny cooperative embedded OS, too. …

faumarz · verified purchase · 4/5

Good starting place for writing your own C utility library or new API

This book has implementations for lots of C interfaces, and uses the literate programming style. Literate programming looks strange at first, but it is very easy to learn to read it. Once you get past that, this book is a swiss army knife of utilities that some of us have implemented from scratch a dozen times. This time someone took a lot of care and effort to implement small little libraries that have a big impact. If you're not interested in the implementation in the book, that's fine. I think the APIs presented can inspire people to design better software interfaces. …

Amazon Customer · verified purchase · 5/5

Where it comes up