6 ms·
With book on Go, Kernighan guides students at Princeton and beyond
- clishem 11y agoI have read the book this article is referring to. Contrary to the raving reviews on Amazon, I wasn't that impressed by it. I imagine that it is a great book for those coming from dynamically typed languages, but if you already know C, for example, the book is probably way too verbose for you.
- dominotw 11y agoI tried to power through it last month but couldn't do it despite my best intentions. Book is a major snoozefest and nothing like its famous cousin 'The C programming language' . I credit the C programming language as one of the books that made my choose writing code as a career. This book on contrary can make no such claims. Save your money and stay away from it.
- _ph_ 11y agoI would have quite the contrary verdict: if you are an experienced programmer and want to read a book about Go, this is the book to get. If you are a programmer, any book which tries to cover a language thoroughly will have slow parts, because they might not be entirely new to you. Yet they need to be told to be thorough. But this book is way faster paced than many books about a programming languages and it is full of short programs, which pack a lot of functionality in a few lines of code - often a small eye-opener.
- skybrian 11y agoBut if you're an experienced programmer, why get a book at all? Effective Go and the Go language specification (which unlike most specifications is very readable) tell you what you need to get started.
- _ph_ 11y agoOh, I got myself started with online resources and was using Go for some months when I got the book - I mostly got it because of the author, to match my "The C programming language". And because I was reasonably fluent with Go, certainly some parts were redundant for my knowledge, but I was very pleasantly surprised how much I still learned from this book and that is why I recommend it. Sometimes it was a little detail in the sample programs which made me say: oh, I had not thought of that.
- frik 11y agoDirect link to the books website: http://www.gopl.io/ http://www.gopl.io/
- alblue 11y agoI wrote a review of this book at InfoQ earlier this year: http://www.infoq.com/articles/the-go-programming-language-book-review http://www.infoq.com/articles/the-go-programming-language-bo... There's a free chapter available from the book's website http://gopl.io http://gopl.io which should give you an idea of what the rest of the book is like. The intro goes into a little bit too much detail but if you gloss over that the remaining chapters are pretty else detailed. There are some nuggets distributed through the book but you could easily gloss over them if you were skim reading it, such as learning that exported identifiers begin with an upper case letter and those that are private are lower case.
- logingone 11y agoexported identifiers begin with an upper case letter and those that are private are lower case I'm not sure that should be considered a nugget, as much as a fundamental.
- alblue 11y agoYes, exactly - I would have expected this to be called out much more prominently than in the middle of page 28, especially when it defines 'exported' and then fails to have an index entry back to it.
- ape4 11y agofrom the book: The Body stream is closed to avoid leaking resources. I would have thought that a modern language would automatically take care of such things.
- jerf 11y agoI'm not sure exactly where you see that so I'm not entirely sure of the context (I tried looking in the first chapter), but a general problem with garbage-collected languages is that while the runtime will eventually get around to cleaning up unused resources, you don't always have guarantees about when. So you still generally need to close files when you're done with them, or you may run out of filehandles. I've encountered this issue in multiple languages, it's not Go-specific.
- deleted 11y ago[deleted]
- plg 11y agoPage margins are so small!
- rangibaby 11y agoI had a look at the PDF and the margins are normal for a magazine, but the font size is what I would consider normal for a book, which means there are too many words per line. For designers: technical publications should have larger margins than a magazine, to leave room for notes, and smaller margins than a book, to save room for graphics.
- alblue 11y agoThe printed book has reasonable margins; there's over an inch of space on both sides of the book. The text is small but to my eyes looks like 12 or 13pt font (caps characters are around 2.5mm high). By way of comparison, the text is around the same as Leslie Lamport's LaTeX book and slightly larger than Donald Knuth's TeX book - though the latter has more dense text as the line spacing is reduced. So yes, it's a dense book, but it's not particularly unusual for a technical book, and the 1" margin is sufficient for small annotations.
- pklausler 11y agoAs an interesting aside, the article points out that the book was formatted with troff.
- DocSavage 11y agoBrett Slatkin wrote a positive review from the perspective of an experienced Go programmer: http://www.onebigfluke.com/2016/03/book-review-go-programming-language.html http://www.onebigfluke.com/2016/03/book-review-go-programmin...
- rottencupcakes 11y agoI should have figured out context based on the name Kernighan, but the word Go (especially as it relates to google) is awfully overloaded for the time being.
- oneeyedpigeon 11y agoFooled me too. Aren't we supposed to refer to it as "golang" for this very reason?
- ArmandGrillet 11y agoThe language is officially called Go and often referenced as Golang. Go should be rebranded Golang (while keeping the go command) in my opinion: the language is still fairly young and has been developed to be the C for the 21st century but "Go" is nearly as bad regarding SEO as "C". There is still time to change the name before Go becomes the programming language taught to people who start programming (and are googling a lot to learn more about it). I would also love to see this transformation so that I can finally know if the new trendiest article on HN is about AI or Golang!
- pklausler 11y agoIs pedagogy a stated goal of Golang?
- _ak 11y agoNot explicitly, but since it's syntax is derived from a Wirth language (Oberon), and Niklaus Wirth had always had a focus on teaching in his languages, it's kinda implied in my opinion.
- echelon 11y agoDo you think Go will become "the" language students and beginners are taught? Why? (I'm genuinely curious!)
- dominotw 11y agodoes gooracle work with 1.6 vendoring ? I can't seem to find an issue tracker for the project.
- kozukumi 11y agogolang is a nice language but I just can't find a reason to use it over other languages for anything other than networking/server projects. How many HN readers are using golang for things you would normally use Java or C++ or Python or ... for? What is it you are working on? And how have you found using golang?
- iheartmemcache 11y agoOriginally it was positioned as a 'systems' programming language (i.e. the C/C++/Rust/D domain) - the community quickly re-oriented itself to more of a Python replacement for the obvious benefits it offered. Network/server projects is exactly what I see it being handy at. You get a fast compile-time language that can do things with your logs/analytic aggregate information in an ad-hoc fashion (really fast compile times and better-than-dynamic-languages-performance), which previously would have costed a lot of time in learning the whole Pig/Hadoop/etc ecosystem or a lot of money in any of the BusinessObjects-esque tooling. Gofmt eliminated styling wars, go doc integration is handy, great 'batteries included' tools out of the box for, typing safety that's comfortable for people who are used to dynamically typed languages to move over without too much hassle[1]. Out of the box code-coverage tooling, good DVCS support, import support for Github is clever (though arguably not the best idea re: security, handy nonetheless since you avoid having YetAnotherPackageManagerWar (pip vs setuptools in Python). The lack of generics (interface{} is such a hack, just like void * in C) is problematic for some, unfortunately. I don't use Go much because I'm a self-admitted typed language elitist but it is definitely a well-designed language[2]. [1] I don't think the average Pythoner really wants to think about co/contravariance unlike in Scala, or Haskell98's type system + the bevy of lang extensions that fall in and out of fashion. [2] Though there's tons of room for improvement-- my hope is that Go moves at the Meijers-C# pace which seems to be a perfect trade-off between adding features not too slowly (i.e. the first 15 years of Java/JVM -- only recently has this changed) but not too quickly either (stability is certainly important, no one wants to see their old code break because a new keyword was added which you previously used as a variable; or far worse, subtle semantic changes in pre-existing constructs).
- danieldk 11y ago
- bitteralmond 11y agoThe magic of Kernighan: "When we were choosing among typesetting systems, Brian never let on that he was one of the original authors of Troff, the system we ultimately went with," Donovan said. "I realized this only after researching many early papers on digital typesetting; Brian co-wrote all of them."
- erikpukinskis 11y agoIt's funny how times change. My first thought was "that's a conflict of interest and it would've been polite to mention it." He apparently doesn't believe that his collaborators might have their own ways of dealing with conflicts. But then: I think it's a generational thing. He is from a world where people have simple allegiances and hidden conflicts are rare. In the Internet age relationships are so fragmented conflicts of interest are part of the day to day collaboration process.
- gravypod 11y agoI don't understand why we "need" textbooks, specifically in the world of Computer Science. Most of the amazing work done to make computers are what they are today is available online.
- danieldk 11y agoCarefully crafted textbooks are comprehensive, balanced, and have a good learning curve (not too steep, not too shallow). Perhaps as importantly, they are edited and contain far fewer errors than a typical blog or Stack Overflow post. As such, they are invaluable as an introduction to new topics. Just to give an example: reading Hopcroft, Motwani & Ullman is far more effective than trying to scrape together automata theory via blog posts or Stack Overflow. As a beginner, you can't even identify what is correct and what is wrong.
- gravypod 11y agoMaybe it's just the books for my course, but I have never seen a book with up to day information, a lack of spelling/subject matter errors, and an easily digestible format. Every textbook I buy has turned into a huge paper weight. Can you recommend some textbooks that aren't like that? I'm interested in EE, CE, and CS (Software engineering, DSP, and concurrency).
- danieldk 11y agoMaybe it's just the books for my course, but I have never seen a book with up to day information Basic CS theory does not really get outdated. There's a couple of dozens book that I could recommend. Anything from Sedgewick & Wayne to Hopcroft, Motwani & Ullman.
- gravypod 11y agoThe theory might not be out of date, but the notes on implementation are quickly outpaced.
- emmelaich 11y ago
- dbpokorny 11y agoWhat problems would you rather attack with C + Go vs. a somewhat more mature C + Python?
- weberc2 11y agoAs someone who has much more experience with Python, the only time I reach for Python is the odd case where there isn't a comparable Go library (think pyqt). Writing Go programs is just easier than Python--the language is much simpler, static typing is a huge boon, documentation for all packages is available at godoc.org in a consistent format, great standard library, single-binary deployment, great concurrency, more performant, standard formatting, standard testing tools, better static analysis support (IDEs can autocomplete, for example), etc.
- muyfine 11y agoOn the positive side, taking COS 333 with Kernighan could not possibly be worse than taking it with Koenig!