8. Libraries

Life can only be understood backwards, but it must be lived forwards.

Søren Kierkegaard

Library design tradeoffs — aims of library design — language support for libraries — early C++ libraries — the stream I/O library — concurrency support — foundation libraries — persistence and databases — numeric libraries — specialized libraries — a standard C++ library.

8.1 Introduction

More often than people realize, designing a library is better than adding a language feature. Classes can represent almost all the concepts we need. Libraries generally can’t help with syntax, but constructors and operator overloading occasionally come in handy. Where needed, special semantics or exceptional performance can be implemented by coding functions ...

Get The Design and Evolution of C++, First Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.