- Paperback: 544 pages
- Publisher: Addison-Wesley Professional; 1 edition (August 30, 1996)
- Language: English
- ISBN-10: 0201498413
- ISBN-13: 978-0201498417
- Product Dimensions: 7.3 x 1.1 x 8.9 inches
- Shipping Weight: 2.2 pounds (View shipping rates and policies)
- Average Customer Review: 24 customer reviews
Amazon Best Sellers Rank:
#587,524 in Books (See Top 100 in Books)
- #6 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Software Reuse
- #197 in Books > Computers & Technology > Programming > Languages & Tools > C & C++ > C
- #342 in Books > Computers & Technology > Programming > Microsoft Programming > C & C++ Windows Programming
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
C Interfaces and Implementations: Techniques for Creating Reusable Software 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
From the Back Cover
Every programmer and software project manager must master the art of creating reusable software modules; they are the building blocks of large, reliable applications. Unlike some modern object-oriented languages, C provides little linguistic support or motivation for creating reusable application programming interfaces (APIs). While most C programmers use APIs and the libraries that implement them in almost every application they write, relatively few programmers create and disseminate new, widely applicable APIs. C Interfaces and Implementations shows how to create reusable APIs using interface-based design, a language-independent methodology that separates interfaces from their implementations. This methodology is explained by example. The author describes in detail 24 interfaces and their implementations, providing the reader with a thorough understanding of this design approach.
Features of C Interfaces and Implementations:
- Concise interface descriptions that comprise a reference manual for programmers interested in using the interfaces.
- A guided tour of the code that implements each chapter's interface tp help those modifying or extending an interface or designing related interfaces.
- In-depth focus on "algorithm engineering:" how to package data structures and related algorithms into reusable modules.
- Source code for 24 APIs and 8 sample applications is examined, with each presented as a "literate program" in which a thorough explanation is interleaved with the source code.
- Rarely documented C programming tricks-of-the-trade.
- Convenient access to all source code in the book via the World Wide Web at http://www.cs.princeton.edu/software/cii/
About the Author
David R. Hanson is a Professor of Computer Science at Princeton University with more than 20 years of research experience in programming languages. He has conducted research in conjunction with Bell Laboratories and is the co-author of lcc, a production quality, research compiler for the C language that is popular with the Unix community. lcc is presented and analyzed in the book A Retargetable C Compiler: Design and Implementation , by Christopher Fraser and David Hanson (c) 1995, Addison-Wesley.
Top customer reviews
The author seems to have prefered a more academic and consequently a scientific style of writing and explanation of things around interfaces and its implementations. Really, the coding style is not easily accessible, hence at times troublesome to follow and crasp. The using of the letter T for the uncomplete types or abstract data types might make the reader somewhat uncomfortable in absorbing the examples given.
But as a whole, this book clearly and systematically demonstrates the plan how to implement abstract data types in C, which requires some patience and discipline to work them out.
The book also excels at showing how more advanced and/or less used parts of the language and standard library can augment the capabilities of your programs. The chapter on Exceptions using setjmp() and longjmp() is worth the price of entry alone. While especially dry, the multiple and extended precision arithmetic chapters also present a topic that is not found in many other places.
If I had to point out one thing that drove me crazy during my reading, it would have to be the overuse of one- and two-letter variable names. While space is at a premium on the page, using names such as "dest" instead of "z" or "sign_of_x" instead of "sx" would have been more elucidating. I found myself losing track of which variable was which in functions that had as many as six one-letter variable names (I'm looking at you XP_div()!).
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. And the concise style is something that we should all work harder to imitate. Most functions are only a half page of text in the book. And the literate programming means those functions are cross referenced and easy for the reader to find.
Really just a joy to read.
The title of the book is not exactly true: this is not a generic text on "C interfaces an implementation", it's a complete and detailed documentation of a well-projected C user level generic library, implementing a lot of ADTs that are not available in the C standard library but are available in many other high(er?) level languages.
You may like or not the semantic details and coding style, probably depending on your background: unix/linux programmers may not like it, as they may not like the ADTs prefix-verbosity...
It's a way to add modularity to a not-object-oriented language as C is; the same for the "typedef struct T *T" (opaque pointers) in headers: modularity and encapsulation.
Pseudocode notation (literate programming) is clear, as long as you read chapter 1.