售价: ¥313.90
免运费且可货到付款详情
加入Prime可免运费加入Prime可免运费
前翻 后翻
正在播放... 已暂停   您正在聆听的 Audible 音频版本的样品。
了解更多信息
查看全部 3 张图片

The Go Programming Language (英语) 平装 – 2015年11月5日

平均5.0 星 2 条商品评论
| 天天低价·正品质优
|
分享
| 自营
广告

显示所有 格式和版本 隐藏其他格式和版本
亚马逊价格
全新品最低价 非全新品最低价
平装
"请重试"
¥313.90
¥313.90
全新品2 售价从 ¥313.90
退换承诺: 此商品支持30天免费退换 详情

全场自营图书满59元包邮:
为了让您购书更轻松,我们决定从2017年1月19日起,在亚马逊中国网站购买59元以上(含59元)自营图书商品,或者满99元以上(含99元)合格商品,即可享受免费配送服务。

click to open popover

经常一起购买的商品

  • The Go Programming Language
  • +
  • Learning Python: Powerful Object-Oriented Programming
总价: ¥855.90
共同购买所选商品

无需Kindle设备,下载免费Kindle阅读软件,即可在您的手机、电脑及平板电脑上畅享阅读。

  • iPhone/iPad/Mac
  • Android手机或平板电脑

请输入您的手机号码,获取Kindle阅读软件的下载链接。



基本信息

  • 出版社: Addison-Wesley Professional; 1 (2015年11月5日)
  • 丛书名: Addison-Wesley Professional Computing Series
  • 平装: 400页
  • 语种: 英语
  • ISBN: 0134190440
  • 条形码: 9780134190440
  • 商品尺寸: 18.8 x 2.3 x 22.9 cm
  • 品牌: Addison-Wesley Professional
  • ASIN: 0134190440
  • 用户评分: 平均5.0 星 2 条商品评论
  • 亚马逊热销商品排名: 图书商品里排第353,179名 (查看图书商品销售排行榜)
  • 您想告诉我们您发现了更低的价格?

商品描述

作者简介

Alan A. A. Donovan is a member of Google’s Go team in New York. He holds computer science degrees from Cambridge and MIT and has been programming in industry since 1996. Since 2005, he has worked at Google on infrastructure projects and was the co-designer of its proprietary build system, Blaze. He has built many libraries and tools for static analysis of Go programs, including oracle, godoc -analysis, eg, and gorename.

 

Brian W. Kernighan is a professor in the Computer Science Department at Princeton University. He was a member of technical staff in the Computing Science Research Center at Bell Labs from 1969 until 2000, where he worked on languages and tools for Unix. He is the co-author of several books, including The C Programming Language, Second Edition (Prentice Hall, 1988), and The Practice of Programming (Addison-Wesley, 1999).

目录

Preface  xi

 

Chapter 1: Tutorial 1

1.1 Hello, World 1

1.2 Command-Line Arguments 4

1.3 Finding Duplicate Lines 8

1.4 Animated GIFs 13

1.5 Fetching a URL 15

1.6 Fetching URLs Concurrently 17

1.7 A Web Server 19

1.8 Loose Ends 23

 

Chapter 2: Program Structure 27

2.1 Names 27

2.2 Declarations 28

2.3 Variables 30

2.4 Assignments 36

2.5 Type Declarations 39

2.6 Packages and Files 41

2.7 Scope 45

 

Chapter 3: Basic Data Types 51

3.1 Integers 51

3.2 Floating-Point Numbers 56

3.3 Complex Numbers 61

3.4 Booleans 63

3.5 Strings 64

3.6 Constants 75

 

Chapter 4: Composite Types 81

4.1 Arrays 81

4.2 Slices 84

4.3 Maps 93

4.4 Structs 99

4.5 JSON 107

4.6 Text and HTML Templates 113

 

Chapter 5: Functions 119

5.1 Function Declarations 119

5.2 Recursion 121

5.3 Multiple Return Values 124

5.4 Errors 127

5.5 Function Values 132

5.6 Anonymous Functions 135

5.7 Variadic Functions 142

5.8 Deferred Function Calls 143

5.9 Panic 148

5.10 Recover 151

 

Chapter 6:. Methods 155

6.1 Method Declarations 155

6.2 Methods with a Pointer Receiver 158

6.3 Composing Types by Struct Embedding 161

6.4 Method Values and Expressions 164

6.5 Example: Bit Vector Type 165

6.6 Encapsulation 168

 

Chapter 7: Interfaces 171

7.1 Interfaces as Contracts 171

7.2 Interface Types 174

7.3 Interface Satisfaction 175

7.4 Parsing Flags with flag.Value 179

7.5 Interface Values 181

7.6 Sorting with sort.Interface 186

7.7 The http.Handler Interface 191

7.8 The error Interface 196

7.9 Example: Expression Evaluator 197

7.10 Type Assertions 205

7.11 Discriminating Errors with Type Assertions 206

7.12 Querying Behaviors with Interface Type Assertions 208

7.13 Type Switches 210

7.14 Example: Token-Based XML Decoding 213

7.15 A Few Words of Advice 216

 

Chapter 8: Goroutines and Channels 217

8.1 Goroutines 217

8.2 Example: Concurrent Clock Server 219

8.3 Example: Concu rent Echo Server 222

8.4 Channels 225

8.5 Looping in Parallel 234

8.6 Example: Concurrent Web Crawler 239

8.7 Multiplexing with select 244

8.8 Example: Concurrent Directory Traversal 247

8.9 Cancellation 251

8.10 Example: Chat Server 253

 

Chapter 9: Concurrency with Shared Variables 257

9.1 Race Conditions 257

9.2 Mutual Exclusion: sync.Mutex 262

9.3 Read/Write Mutexes: sync.RWMutex 266

9.4 Memory Synchronization 267

9.5 Lazy Initialization: sync.Once 268

9.6 The Race Detector 271

9.7 Example: Concurrent Non-Blocking Cache 272

9.8 Goroutines and Threads 280

 

Chapter 10: Packages and the Go Tool 283

10.1 Introduction 283

10.2 Import Paths 284

10.3 The Package Declaration 285

10.4 Import Declarations 285

10.5 Blank Imports 286

10.6 Packages and Naming 289

10.7 The Go Tool 290

 

Chapter 11: Testing 301

11.1 The go test Tool 302

11.2 Test Functions 302

11.3 Coverage 318

11.4 Benchmark Functions 321

11.5 Profiling 323

11.6 Example Functions 326

 

Chapter 12: Reflection 329

12.1 Why Reflection? 329

12.2 reflect.Type and reflect.Value 330

12.3 Display, a Recursive Value Printer 333

12.4 Example: Encoding S-Expressions 338

12.5 Setting Variables with reflect.Value 341

12.6 Example: Decoding S-Expressions 344

12.7 Accessing Struct Field Tags 348

12.8 Displaying the Methods of a Type 351

12.9 A Word of Caution 352

 

Chapter 13: Low-Level Programming 353

13.1 unsafe.Sizeof, Alignof, and Offsetof 354

13.2 unsafe.Pointer 356

13.3 Example: Deep Equivalence 358

13.4 Calling C Code with cgo 361

13.5 Another Word of Caution 366

 

Index 367


看过此商品后顾客买的其它商品?

商品评论

平均5.0 星
5 星
2
4 星
0
3 星
0
2 星
0
1 星
0
查看两份评论
与其他用户分享您的观点

热门买家评论

评论者 A.C.Von 于 2016年5月30日
版本: 平装
我喜欢Go的设计,目前最为欣赏的语言之一。
回应 这条评论对您有用吗? 正在提交你的反馈。
感谢您的反馈。
很抱歉,我们没有记录您的投票。请重试
举报
版本: 平装 已确认购买
很不错的一本书,还没看完
回应 这条评论对您有用吗? 正在提交你的反馈。
感谢您的反馈。
很抱歉,我们没有记录您的投票。请重试
举报

此商品在美国亚马逊上最有用的商品评论 (beta) (可能包括"Early Reviewer Rewards Program"的评论)

美国亚马逊: 平均4.7 星 112 条评论
26/26 人认为此评论有用
平均5.0 星 Excellent book. It did what the others didn't 2016年1月27日
评论者 Clinton Begin - 已在美国亚马逊上发表
版本: Kindle电子书 已确认购买
I tried another Go book, before tossing it aside in favor of this one. Excellent book. It did what the others didn't: it explained "why". Go is a weird language. So if the reasoning behind the decisions is left out, then the language is hard to swallow. But with proper explanation of the reasoning, one can see the wisdom of Go and forgive some of its odd design and syntax decisions.
14/15 人认为此评论有用
平均5.0 星 The Goldilocks Go Book 2016年10月2日
评论者 Peter - 已在美国亚马逊上发表
版本: 平装 已确认购买
This is the best book (out of 5) that I have read on Go. It's rare to find something in the computer science world that is as accessible and yet as accurate as this work. The examples are excellent and the explanations and instructions clear. Like the language itself it emphasizes clarity and simplicity and abstracts away the right parts, allowing for both accurate understanding and the avoidance of unnecessary complexity.

It also provides the most solid grounding for getting more deeply involved in the more complex areas of the language, which it introduces on a gradient, without getting too thoroughly involved in them.

I have a feeling that It would work reasonably well as a beginner's book, although you might want to make it the second book (or a follow up to the many free tutorials on-line) if you're brand new to programming. It could easily be a first Go book if you've produced even trivial programs in any other language. I highly recommend it to anyone who is not yet fully comfortable reading the language spec and standard library source code. And even if you are happy doing so, you're not going to be doing yourself any harm by reading this work.
5/5 人认为此评论有用
平均5.0 星 Highly recommend as your first intro to Go 2016年12月11日
评论者 Amazon Customer - 已在美国亚马逊上发表
版本: 平装 已确认购买
Excellent book that teaches you the Go programming language from a seasoned pedagogical perspective. I like how the code examples in the text show the topic at hand, while "teasing" you with features that will be mentioned shortly after... I read through the whole book minus the last chapter or 2 (they basically tell you to ignore those unless you ABSOLUTELY need reflection & C bindings, and that is to discourage you from becoming too cozy with the "hackish" and unsafe parts of the language) and I have had a good experience writing Go for the past 9 months, refining my understanding and mastery of the language. With embedded systems work, I find myself using Go to prototype processes and procedures on a Linux machine (e.g. Raspberry Pi) before implementing the procedure in C for microcontrollers that can't handle Go; the Go language helps me iterate through the issues and understand the role of parallelism before diving into the intricacies of C and RTOS.
67/72 人认为此评论有用
平均4.0 星 Thorough coverage; excellent examples; but maybe not essential 2016年1月5日
评论者 David Golden - 已在美国亚马逊上发表
版本: 平装
[Disclaimer: I was provided with a free review copy by the publisher.]

TL;DR

If you're looking to buy a comprehensive text on Go, "The Go Programming Language" is an excellent choice. But with so many free e-book introductions to Go, do you really need it? Maybe, but maybe not.

OVERVIEW

The authors "assume that you have programmed in one or more other languages" and thus "won't spell out everything as if for a total beginner". Yet the book weighs in at a hefty 380 pages (over 100 pages more than my venerable 1988 K&R 2nd edition).

Is it better than the free 50-page "Little Go Book", or the free 160-page "Introduction to Programming in Go" or even the freely-available 80-page Go Language Specification itself? Yes, certainly. But is it two or three or four times as good? I don't think so.

So is "The Go Programming Language" worth the cost to read in both dollars *and* time? It depends on how you learn, how much you already know, and whether, for you, the good parts outweigh the bad.

THE GOOD PARTS

Chapter 1 ("Tutorial") sets the stage for much of what is excellent about this book: fabulous examples. Beyond the obligatory "Hello World", it presents a quick look at several simplified "real world" examples, including command line text filtering, image generation/animation, URL fetching and serving a web page.

The rest of the book follows this same pattern. Chapters typically present several different code examples, most of which do real things rather than just consist of toy code. They include exercises (which I didn't do), that would be good for a course or for someone who learns best by doing structured exercises. The examples are enough to serve as a starting "cookbook" for many real-world tasks.

I also found the explanations of struct embedding and composition to be excellent. Some concepts gelled much better for me than they had from other texts and even from my own coding to date. I had the same experience in the chapter on concurrency with channels. I was pleased that things so idiosyncratic to Go were some of the best parts of the book.

THE BAD PARTS

Sadly, the book's coverage of the standard library is haphazard. On the one hand, the many real world code examples gave opportunities to introduce parts of the standard library naturally throughout. Unfortunately, that also means there's no comprehensive coverage of the standard library itself, which is surprising given that it's one of great strengths of the language.

The most glaring example of this ad hoc approach was finding a section on text and HTML templating oddly dropped in at the end of Chapter 4 ("Composite Types"). It was as if they really wanted to cover those packages and -- without a chapter dedicated to the standard library -- had nowhere else to put it.

As mentioned previously, the book is long and rather dense. It's not a quick read. Worse, the authors have a habit of burying important points or cautions in the middle of a wall of text and code examples. The lack of cutesy caution icons or call-out boxes for these tidbits (as would be found in more informally-styled books) really hurts skim-ability.

THE MIXED PARTS

As great as the examples were, I found some aspects disturbing. First, in some cases, implementation details were omitted from the text -- the reader is expected to download the source to see the full example. I would have preferred complete, if less ambitious, examples instead.

In other cases -- particularly in the sections on concurrency -- the examples are presented in a progression of one or more complete "wrong" examples of how not to do things before an example of the "right" way to do things. This approach is a good teaching method, but it adds substantially to the length of the text -- you have to grok a lot more code to parse out the differences between the examples.

The other interesting observation I had was that in many cases, the examples omit error handling for brevity. Since the verbosity of Go code error handling is a frequent criticism of the language, omitting it seemed somehow disingenuous.

SUMMARY

If you have the money and patience and you like deep dives and real, working examples and exercises, this book is an excellent choice. If you prefer to skim or dabble, or just want a handy reference text, there are probably better options.
10/11 人认为此评论有用
平均5.0 星 Only Go book you need to buy 2015年12月12日
评论者 Varun - 已在美国亚马逊上发表
版本: 平装 已确认购买
Every programming language has one book that become the de-facto book. C has K&R and other programming languages has their own. This book is for Go what is K&R for C. If you ever want to buy a Go programming language book, this book should be the one. I have been programming in Go from almost an year and I also find some new tricks from the book. Also I use this book as a reference when I need to brush up some concept.