|
|
Subscribe / Log in / New account

Zeuthen: Writing a C library, part 3

Zeuthen: Writing a C library, part 3

[Development] Posted Jun 30, 2011 15:02 UTC (Thu) by corbet

The third part of David Zeuthen's guide to writing low-level libraries looks at modularity, error handling, and object-oriented design. "Even with a library doing proper parameter validation (to catch programmer errors early on), if you pass garbage to a function you usually end up with undefined behavior and undefined behavior can mean anything including formatting your hard disk or evaporating all booze in a five-mile radius (oh noz). That's why some libraries simply calls abort() instead of carrying on pretending nothing happened."

Comments (none posted)


Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds