作者:
(美)David R. Hanson
出版社: 人民邮电出版社
出品方: 图灵教育
原作名: C Interfaces and Implementations: Techniques for Creating Reusable Software
出版年: 2010-8
页数: 519
定价: 79.00元
丛书: 图灵程序设计丛书·C/C++系列
ISBN: 9787115231130
出版社: 人民邮电出版社
出品方: 图灵教育
原作名: C Interfaces and Implementations: Techniques for Creating Reusable Software
出版年: 2010-8
页数: 519
定价: 79.00元
丛书: 图灵程序设计丛书·C/C++系列
ISBN: 9787115231130
内容简介 · · · · · ·
可重用的软件模块是构建大规模可靠应用程序的基石,创建可重用的软件模块是每个程序员和项目经理必须掌握的技能。C语言对创建可重用的API提供的语言和功能支持非常少,虽然C程序员写应用时都会用到API和库,但却很少有人去创建和发布新的能广泛应用的API。本书介绍用一种基于接口的设计方法创建可重用的API,这一方法将接口与实现分离开来,且与语言无关。书中详细描述了24个接口及其实现,便于读者深入了解此方法。这些接口涉及很多计算机领域的知识,包括数据结构、算法、字符串处理和并发程序。
本书是C语言领域的的经典名著,出版十余年仍畅销不衰,是几代程序员倍加推崇的力作。
作者简介 · · · · · ·
David R.Hanson 普林斯顿大学计算机科学系教授,有着二十多年编程语言研究经验。他曾经同贝尔实验室合作开展研究工作,是适用于UNIX系统上的高质量C编译器Icc的开发者之一。另著有A Retargetable C Compiler: Design and Implementation一书。
目录 · · · · · ·
1 Introduction 1
1.1 Literate Programs 2
1.2 Programming Style 8
1.3 Efficiency 11
Further Reading 12
Exercises 13
· · · · · · (更多)
1.1 Literate Programs 2
1.2 Programming Style 8
1.3 Efficiency 11
Further Reading 12
Exercises 13
· · · · · · (更多)
1 Introduction 1
1.1 Literate Programs 2
1.2 Programming Style 8
1.3 Efficiency 11
Further Reading 12
Exercises 13
2 Interfaces and Implementations 15
2.1 Interfaces 15
2.2 Implementations 18
2.3 Abstract Data Types 21
2.4 Client Responsibilities 24
2.5 Efficiency 30
Further Reading 30
Exercises 31
3 Atoms 33
3.1 Interface 33
3.2 Implementation 34
Further Reading 42
4 Exceptions and Assertions 45
4.1 Interface 47
.4.2 Implementation 53
4.3 Assertions 59
Further Reading 63
Exercises 64
5 Memory Management 67
5.1 Interface 69
5.2 Production Implementation 73
5.3 Checking Implementation 76
Further Reading 85
Exercises 86
6 More Memory Management 89
6.1 Interface 90
6.2 Implementation 92
Further Reading 98
Exercises 100
7 Lists 103
7.1 Interface 103
7.2 Implementation 108
Further Reading 113
Exercises 114
8 Tables 115
8.1 Interface 115
8.2 Example: Word Frequencies 118
8.3 Implementation 12 5
Further Reading 132
Exercises 133
9 Sets 137
9.1 Interface 138
9.2 Example: Cross-Reference Listings 140
9.3 Implementation 148
9.3.1 Member Operations 150
9.3.2 Set Operations 154
Further Reading 158
Exercises 158
10 Dynamic Arrays
10.1 Interfaces 162
10.2 Implementation 165
Further Reading 169
Exercises 169
11 Sequences 171
11.1 Interface 171
11.2 Implementation 174
Further Reading 180
Exercises 180
12 Rings 183
12.1 Interface 183
12.2 Implementation 187
Further Reading 196
Exercises 197
13 Bit Vectors 199
13.1 Interface 199
13.2 Implementation 202
13.2.1 Member Operations 204
13.2.2 Comparisons 209
13.2.3 Set Operations 211
Further Reading 213
Exercises 21314 Formatting 215
14.1 Interface 216
14.1.1 Formatting Functions 216
14.1.2 Conversion Functions 219
14.2 Implementation 224
14.2.1 Formatting Functions 225
14.2.2 Conversion Functions 232
Further Reading 238
Exercises 239
15 Low-LevelStrings 241
15.1 Interface 243
15.2 Example: Printing Identifiers 249
15.3 Implementation 251
15.3.1 String Operations 252
15.3.2 Analyzing Strings 258
15.3.3 Conversion Functions 263
Further Reading 264
Exercises 265
16 High-LevelStrings 269
16.1 Interface 269
16.2 Implementation 276
16.2.1 String Operations 281
16.2.2 Memory Management 285
16.2.3 Analyzing Strings 288
16.2.4 Conversion Functions 293
Further Reading 293
Exercises 294
17 Extended-Precision Arithmetic 297
17.1 Interface 297
17.2 Implementation 303
17.2.1 Addition and Subtraction 305
17.2.2 Multiplication 307
17.2.3 Division and Comparison 309
17.2.4 Shifting 315
17.2.5 String Conversions 319
Further Reading 321
Exercises 322
18 Arbitrary-Precision Arithmetic 323
18.1 Interface 323
18.2 Example: A Calculator 327
18.3 Implementation 334
18.3.1 Negation and Multiplication 337
18.3.2 Addition and Subtraction 338
18.3.3 Division 342
18.3.4 Exponentiation 343
18.3.5 Comparisons 346
18.3.6 Convenience Functions 347
18.3.7 Shifting 349
18.3.8 String and Integer Conversions 350
Further Reading 353
Exercises 354
19 Multiple-Precision Arithmetic 357
19.1 Interface 358
19.2 Example: Another Calculator 365
19.3 Implementation 373
19.3.1 Conversions 377
19.3.2 Unsigned Arithmetic 380
19.3.3 Signed Arithmetic 383
19.3.4 Convenience Functions 388
19.3.5 Comparisons and Logical Operations 395
19.3.6 String Conversions 399
Further Reading 402
Exercises 402
20 Threads 405
20.1 Interfaces 408
20.1.1 Threads 409
20.1.2 General Semaphores 413
20.1.3 Synchronous Communication Channels 417
20.2 Examples 418
20.2.1 Sorting Concurrently 418
20.2.2 Critical Regions 423
20.2.3 Generating Primes 426
20.3 Implementations 431
20.3.1 Synchronous Communication Channels 431
20.3.2 Threads 434
20.3.3 Thread Creation and Context-Switching 446
20.3.4 Preemption 454
20.3.5 General Semaphores 457
20.3.6 Context-Switching on the MIPS and ALPHA 459
Further Reading 463
Exercises 465
Interface Summary 469
Bibliography 497
Index 505
· · · · · · (收起)
1.1 Literate Programs 2
1.2 Programming Style 8
1.3 Efficiency 11
Further Reading 12
Exercises 13
2 Interfaces and Implementations 15
2.1 Interfaces 15
2.2 Implementations 18
2.3 Abstract Data Types 21
2.4 Client Responsibilities 24
2.5 Efficiency 30
Further Reading 30
Exercises 31
3 Atoms 33
3.1 Interface 33
3.2 Implementation 34
Further Reading 42
4 Exceptions and Assertions 45
4.1 Interface 47
.4.2 Implementation 53
4.3 Assertions 59
Further Reading 63
Exercises 64
5 Memory Management 67
5.1 Interface 69
5.2 Production Implementation 73
5.3 Checking Implementation 76
Further Reading 85
Exercises 86
6 More Memory Management 89
6.1 Interface 90
6.2 Implementation 92
Further Reading 98
Exercises 100
7 Lists 103
7.1 Interface 103
7.2 Implementation 108
Further Reading 113
Exercises 114
8 Tables 115
8.1 Interface 115
8.2 Example: Word Frequencies 118
8.3 Implementation 12 5
Further Reading 132
Exercises 133
9 Sets 137
9.1 Interface 138
9.2 Example: Cross-Reference Listings 140
9.3 Implementation 148
9.3.1 Member Operations 150
9.3.2 Set Operations 154
Further Reading 158
Exercises 158
10 Dynamic Arrays
10.1 Interfaces 162
10.2 Implementation 165
Further Reading 169
Exercises 169
11 Sequences 171
11.1 Interface 171
11.2 Implementation 174
Further Reading 180
Exercises 180
12 Rings 183
12.1 Interface 183
12.2 Implementation 187
Further Reading 196
Exercises 197
13 Bit Vectors 199
13.1 Interface 199
13.2 Implementation 202
13.2.1 Member Operations 204
13.2.2 Comparisons 209
13.2.3 Set Operations 211
Further Reading 213
Exercises 21314 Formatting 215
14.1 Interface 216
14.1.1 Formatting Functions 216
14.1.2 Conversion Functions 219
14.2 Implementation 224
14.2.1 Formatting Functions 225
14.2.2 Conversion Functions 232
Further Reading 238
Exercises 239
15 Low-LevelStrings 241
15.1 Interface 243
15.2 Example: Printing Identifiers 249
15.3 Implementation 251
15.3.1 String Operations 252
15.3.2 Analyzing Strings 258
15.3.3 Conversion Functions 263
Further Reading 264
Exercises 265
16 High-LevelStrings 269
16.1 Interface 269
16.2 Implementation 276
16.2.1 String Operations 281
16.2.2 Memory Management 285
16.2.3 Analyzing Strings 288
16.2.4 Conversion Functions 293
Further Reading 293
Exercises 294
17 Extended-Precision Arithmetic 297
17.1 Interface 297
17.2 Implementation 303
17.2.1 Addition and Subtraction 305
17.2.2 Multiplication 307
17.2.3 Division and Comparison 309
17.2.4 Shifting 315
17.2.5 String Conversions 319
Further Reading 321
Exercises 322
18 Arbitrary-Precision Arithmetic 323
18.1 Interface 323
18.2 Example: A Calculator 327
18.3 Implementation 334
18.3.1 Negation and Multiplication 337
18.3.2 Addition and Subtraction 338
18.3.3 Division 342
18.3.4 Exponentiation 343
18.3.5 Comparisons 346
18.3.6 Convenience Functions 347
18.3.7 Shifting 349
18.3.8 String and Integer Conversions 350
Further Reading 353
Exercises 354
19 Multiple-Precision Arithmetic 357
19.1 Interface 358
19.2 Example: Another Calculator 365
19.3 Implementation 373
19.3.1 Conversions 377
19.3.2 Unsigned Arithmetic 380
19.3.3 Signed Arithmetic 383
19.3.4 Convenience Functions 388
19.3.5 Comparisons and Logical Operations 395
19.3.6 String Conversions 399
Further Reading 402
Exercises 402
20 Threads 405
20.1 Interfaces 408
20.1.1 Threads 409
20.1.2 General Semaphores 413
20.1.3 Synchronous Communication Channels 417
20.2 Examples 418
20.2.1 Sorting Concurrently 418
20.2.2 Critical Regions 423
20.2.3 Generating Primes 426
20.3 Implementations 431
20.3.1 Synchronous Communication Channels 431
20.3.2 Threads 434
20.3.3 Thread Creation and Context-Switching 446
20.3.4 Preemption 454
20.3.5 General Semaphores 457
20.3.6 Context-Switching on the MIPS and ALPHA 459
Further Reading 463
Exercises 465
Interface Summary 469
Bibliography 497
Index 505
· · · · · · (收起)
丛书信息
图灵程序设计丛书·C/C++系列 (共37册),
这套丛书还有
《C语言程序设计》,《C语言接口与实现》,《C++必知必会》,《C++ Primer 中文版(第 4 版)》,《C++程序设计实践与技巧 测试驱动开发》 等。
喜欢读"C语言接口与实现"的人也喜欢的电子书 · · · · · ·
支持 Web、iPhone、iPad、Android 阅读器
喜欢读"C语言接口与实现"的人也喜欢 · · · · · ·
C语言接口与实现的书评 · · · · · · ( 全部 7 条 )



哪位同仁做了这本书的课后习题??
如题,哪位朋友对这本书的课后习题敢兴趣,可以在这里一起讨论讨论。 我在看这本书的时候,对每章课后习题都不是很理解,不知道该怎么解决,还希望与各位一起讨论。 豆娘说我评论太短了~ 还是有点短~
(展开)

我觉得翻译的很差阿,这本书
这篇书评可能有关键情节透露
有很多内容感觉就像一个不懂编程的人翻译的,让人看后不知所云,只能细细推敲真实的意思。真实感觉!而且此书结构很奇怪,代码看起来特别的累。 (展开)> 更多书评 7篇
论坛 · · · · · ·
C语言接口与实现:创建可重用软件的技术 样张试读 | 来自互动出版网 | 4 回应 | 2012-08-14 23:30:19 |
这本书的其他版本 · · · · · · ( 全部5 )
-
机械工业出版社 (2004)8.2分 140人读过
-
Addison-Wesley Professional (1996)9.5分 22人读过
-
人民邮电出版社 (2011)9.1分 127人读过
-
人民邮电出版社 (2016)8.3分 20人读过
以下书单推荐 · · · · · · ( 全部 )
- 程序设计丛书 (敏子爱书)
- 好教材 (二赫)
- 我的书单 (thinkinnight)
- *nix & C (ClutchBear©)
- 豆瓣评分>=8.5的计算机书籍 (Honwhy)
谁读这本书?
二手市场
订阅关于C语言接口与实现的评论:
feed: rss 2.0
0 有用 andi 2012-05-27 21:42:17
异常框架甚是喜欢。
0 有用 henix 2012-08-05 12:52:06
读的是 http://book.douban.com/subject/1230040/
0 有用 Scan 2014-04-06 13:28:54
难得一见的高品质代码。相对而言低级字符串那章差一些。这本书不是工程上最好的做法,但有很高的参考价值。第3章大谈异常,但仍然没提及怎样处理由setjmp、longjmp引入的资源泄露问题(我认为finally几乎不可用。我认可的只有GC、RAII、defer、using、with等做法)
0 有用 小李 2013-03-04 14:12:29
The second C book you should read after "The C programming language", maybe better than the first one^^
0 有用 泽洋 2012-05-04 22:22:04
好难懂啊~
0 有用 vandu 2017-09-18 14:52:28
大一时候看的? 不过跳了好多,当时当成做数据结构入门了,暑假在家时候突然想翻一下,回校后大致过了一遍,有些东西当时看得懂就呵呵了......
1 有用 placebo 2014-10-02 16:14:36
此书太棒了!强烈推荐
0 有用 Scan 2014-04-06 13:28:54
难得一见的高品质代码。相对而言低级字符串那章差一些。这本书不是工程上最好的做法,但有很高的参考价值。第3章大谈异常,但仍然没提及怎样处理由setjmp、longjmp引入的资源泄露问题(我认为finally几乎不可用。我认可的只有GC、RAII、defer、using、with等做法)
1 有用 figure9 2013-09-12 14:50:56
handful of industrial-level robust code, although the literacy coding style is weird
0 有用 小李 2013-03-04 14:12:29
The second C book you should read after "The C programming language", maybe better than the first one^^