Fluent C - Principles, Practices, and Patterns Table of Contents
Return to Fluent C, C Language Design Patterns, C Language, C Language Bibliography, C Language Courses, C Language DevOps - C Language CI/CD, C Language Security - C Language DevSecOps, C Language Functional Programming, C Language Concurrency, C Language Data Science - C Language and Databases, C Language Machine Learning, C Language Glossary, Awesome C Language, C Language GitHub, C Language Topics
Preface vii
Part I. C Patterns
1. Error Handling . . . 3
Object-Based Error Handling 22
Summary 26
Outlook 27
2. Returning Error Information29
Return Status Codes 32
Log Errors 48
Summary 55
Outlook 56
iii
3. Memory Management . 57
Data Storage and Problems with Dynamic Memory 59
Stack First 62
Lazy Cleanup 69
Memory Pool 84
Summary 90
Outlook 91
4. Returning Data from C Functions . . . . 93
Return Value 95
Out-Parameters 99
Caller-Owned Buffer 111
Callee Allocates 116
Summary 120
Outlook 120
5. Data Lifetime and Ownership . . . . 121
Software-Module with Global State 127
Caller-Owned Instance 132
Shared Instance 138
Summary 144
Further Reading 145
Outlook 145
Header Files 149
Handle 152
Summary 163
Further Reading 163
Outlook 164
iv | Table of Contents
7. Flexible Iterator Interfaces165
Running Example 167
Cursor Iterator 172
Summary 182
Further Reading 183
Outlook 183
8. Organizing Files in Modular Programs . . . 185
Running Example 187
Include Guard 189
Software-Module Directories 192
Summary 216
Outlook 216
9. Escaping
- ifdef Hell 217
Running Example 219
Avoid Variants 220
Isolated Primitives 224
Atomic Primitives 227
Split Variant Implementations 236
Summary 242
Further Reading 243
Outlook 243
Part II. Pattern Stories
10. Implementing Logging Functionality . . . 247
The Pattern Story 247
File Organization 248
Multiple Logging Destinations 253
File Logging 254
Cross-Platform Files 255
Using the Logger 259
Summary 259
11. Building a User Management System . . . 261
The Pattern Story 261
Data Organization 261
File Organization 263
Authentication: Error Handling 264
Authentication: Error Logging 266
Adding Users: Error Handling 267
Iterating 269
Using the User Management System 272
Summary 272
12. Conclusion . . 275
What You've Learned 275
Further Reading 275
Closing Remarks 276
Index . . . . . 277
vi | Table of Contents
Fair Use Sources
C Language: C Fundamentals, C Inventor - C Language Designer: Dennis Ritchie in 1972; C Standards: ANSI X3J11 (ANSI C); ISO/IEC JTC 1 (Joint Technical Committee 1) / SC 22 (Subcommittee 22) / WG 14 (Working Group 14) (ISO C); C Keywords, C Pointers, C Data Structures - C Algorithms, C Syntax, C Memory Management, C Recursion, C on Android, C on Linux, C on macOS, C on Windows, C Installation, C Containerization, C Configuration, C Compiler, C IDEs (CLion), C Development Tools, C DevOps - C SRE, C Data Science - C DataOps, C Machine Learning, C Deep Learning, C Concurrency, C History, C Bibliography, Manning C Programming Series, C Glossary, C Topics, C Courses, C Standard Library, C Libraries, C Frameworks, C Research, C GitHub, Written in C, C Popularity, C Awesome List, C Versions. (navbar_c)
Design Patterns: Design Patterns - Elements of Reusable Object-Oriented Software by GoF, Awesome Design Patterns, Awesome Software Design, Pattern, Design, Anti-Patterns, Code Smells, Best Practices, Software Architecture, Software Design, Design Principles, Design Patterns Bibliography, C Language Design Patterns, C++ Design Patterns, C# Design Patterns, Golang Design Patterns, Java Design Patterns, JavaScript Design Patterns, Kotlin Design Patterns, Node.js Design Patterns, Python Design Patterns, TypeScript Design Patterns, Scala Design Patterns, Swift Design Patterns. (navbar_designpatterns)
© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.