流利的C语言(影印版)
Christopher Preschern
出版时间:2023年03月
页数:281
“满满的实例,本书是一份不可多得的资料,可以让你的代码更加简洁,更易于维护。”
——David Griffiths
Head First C作者
“本书将带领新手步入打造工业级C程序的行列。”
——Robert Hanmer
软件架构师

关于C语言编程的专家建议很难找到。虽然面向对象编程语言的参考帮助有很多,但针对C语言的同类信息却少得令人吃惊。通过这本实践指南,初学者和有经验的C语言程序员都能找到相关的设计决策指导,包括在构建大型程序时如何将它们循序渐进地应用于现役代码。
作为设计模式社区的主要成员,Christopher Preschern解答了如何构造C程序、应对错误处理、设计柔性接口等问题。无论你是在寻找特定的模式,还是想了解特定主题的设计选择,本书都能助你一臂之力。在第一部分中,你将学习如何实现专门针对C编程语言的实用设计知识。
第二部分包括应用C编程模式实现大型程序。你将从中学习到模式是如何通过良好的设计决策提高工作效率的。本书包括以下模式:
● 错误处理
● 返回错误信息
● 内存管理
● 从C函数返回数据
● 数据生命周期和所有权
● 柔性API
● 柔性迭代器接口
● 在模块化程序中组织文件
● 摆脱#ifdel地狱
  1. Preface
  2. Part I. C Patterns
  3. 1. Error Handling
  4. Running Example
  5. Function Split
  6. Guard Clause
  7. Samurai Principle
  8. Goto Error Handling
  9. Cleanup Record
  10. Object-Based Error Handling
  11. Summary
  12. Further Reading
  13. Outlook
  14. 2. Returning Error Information
  15. Running Example
  16. Return Status Codes
  17. Return Relevant Errors
  18. Special Return Values
  19. Log Errors
  20. Summary
  21. Further Reading
  22. Outlook
  23. 3. Memory Management
  24. Data Storage and Problems with Dynamic Memory
  25. Running Example
  26. Stack First
  27. Eternal Memory
  28. Lazy Cleanup
  29. Dedicated Ownership
  30. Allocation Wrapper
  31. Pointer Check
  32. Memory Pool
  33. Summary
  34. Further Reading
  35. Outlook
  36. 4. Returning Data from C Functions
  37. Running Example
  38. Return Value
  39. Out-Parameters
  40. Aggregate Instance
  41. Immutable Instance
  42. Caller-Owned Buffer
  43. Callee Allocates
  44. Summary
  45. Outlook
  46. 5. Data Lifetime and Ownership
  47. Stateless Software-Module
  48. Software-Module with Global State
  49. Caller-Owned Instance
  50. Shared Instance
  51. Summary
  52. Further Reading
  53. Outlook
  54. 6. Flexible APIs
  55. Header Files
  56. Handle
  57. Dynamic Interface
  58. Function Control
  59. Summary
  60. Further Reading
  61. Outlook
  62. 7. Flexible Iterator Interfaces
  63. Running Example
  64. Index Access
  65. Cursor Iterator
  66. Callback Iterator
  67. Summary
  68. Further Reading
  69. Outlook
  70. 8. Organizing Files in Modular Programs
  71. Running Example
  72. Include Guard
  73. Software-Module Directories
  74. Global Include Directory
  75. Self-Contained Component
  76. API Copy
  77. Summary
  78. Outlook
  79. 9. Escaping #ifdef Hell
  80. Running Example
  81. Avoid Variants
  82. Isolated Primitives
  83. Atomic Primitives
  84. Abstraction Layer
  85. Split Variant Implementations
  86. Summary
  87. Further Reading
  88. Outlook
  89. Part II. Pattern Stories
  90. 10. Implementing Logging Functionality
  91. The Pattern Story
  92. Summary
  93. 11. Building a User Management System
  94. The Pattern Story
  95. Summary
  96. 12. Conclusion
  97. What You’ve Learned
  98. Further Reading
  99. Closing Remarks
  100. Index
书名:流利的C语言(影印版)
国内出版社:东南大学出版社
出版时间:2023年03月
页数:281
书号:978-7-5766-0562-4
原版书书名:Fluent C
原版书出版商:O'Reilly Media
Christopher Preschern
 
Christopher Preschern组织了设计模式会议并发起了改进模式编写的倡议。作为ABB公司的C程序员,他收集并记录了如何编写工业级代码的实践知识。他曾在格拉茨科技大学讲授编码以及代码质量的相关课程,拥有计算机科学博士学位。
 
 
The animal on the cover of Fluent C is a Major Mitchell’s cockatoo (Lophochroa leadbeateri), also known as Leadbeater’s cockatoo or the pink cockatoo. This mediumsized cockatoo is named after Major Thomas Mitchell, a surveyor and explorer of southeastern Australia. It is native to the arid and semi-arid parts of Australia, preferring wooded areas where it can forage for seeds. Its plumage is primarily white and a pale salmon pink, with deeper pink under its wings and a bright red, yellow, and white crest. Males and females look almost identical, though males are usually a little larger and have brown eyes, while females have reddish-pink eyes and broader yellow stripes in their crests.
Major Mitchell’s cockatoos are popular as pets, though they are very social birds that require a great deal of attention from their owners. In the wild, they nest in pairs and require large territories, making their habitats vulnerable to fragmentation. Although they are considered a species of least concern, their numbers have declined as woodlands have been cleared. They are also threatened by illegal trapping for the pet trade.
购买选项
定价:109.00元
书号:978-7-5766-0562-4
出版社:东南大学出版社