Ian Channing reviewed JavaScript: The Good Parts by Douglas Crockford
Review of 'JavaScript: The Good Parts' on 'Goodreads'
5 stars
Best description of the function underpinnings of Javascript
Paperback, 250 pages
English language
Published May 15, 2008 by O'Reilly Media, Inc..
JavaScript, having been developed and released in a hurry before it could be refined, has more than its share of the bad parts. This book scrapes away these bad features to reveal a JavaScript subset that's more reliable, readable, and maintainable than the language as a whole-a subset you can use to create extensible and efficient code. (back cover copy)
Best description of the function underpinnings of Javascript
Great as a primer or as a reminder. It's not complete, and is definitely opinionated, but it's a good start and a well - reasoned argument to use only the subset of JavaScript defined here.
I was never going to be thrilled with this book because ugh, javascript.
But I was expecting more than a typical 2-star throwaway tech book. It was hard to get past the inconsistency (globals variables are bad, let's tack new methods onto global prototype objects!), bad editing, and repetition (I think one code snippet was repeated a total of 3 times).
A lot of people seem to like this book. If the idea of subsetting a language to produce a better variant is new to you, or if you've been stuck in the javascript salt mines, without noticing the river Lisp curving its way through them, or perhaps if protypical inheritance is a new concept for you, I can see how it could be a breath of fresh air. None of that holds for me, so it wasn't. The javascript subset he comes up with seems rather clumsy, and verbose, โฆ
I was never going to be thrilled with this book because ugh, javascript.
But I was expecting more than a typical 2-star throwaway tech book. It was hard to get past the inconsistency (globals variables are bad, let's tack new methods onto global prototype objects!), bad editing, and repetition (I think one code snippet was repeated a total of 3 times).
A lot of people seem to like this book. If the idea of subsetting a language to produce a better variant is new to you, or if you've been stuck in the javascript salt mines, without noticing the river Lisp curving its way through them, or perhaps if protypical inheritance is a new concept for you, I can see how it could be a breath of fresh air. None of that holds for me, so it wasn't. The javascript subset he comes up with seems rather clumsy, and verbose, and easy to get wrong -- not very compelling.
Also, I disliked the railroad diagrams. In most cases a short English description would have been easier to understand, or a BNF would have been easier to read and equally precise. Many of the diagrams seemed gratuitous. They may read better on paper than on a screen. I read it in epub format, which also suffered from an unclosed italics tag messing up a chapter.
The parts I did like: The evidence of a keen mind on the other end of the book, and occasional flashes of insight. The clearest descripton of the "this" scoping mess that I've seen. Good descriptions of many of the stupid gotchas in the language, including the craziness that are javascript arrays.
If it had been called "Javascript: The Bad Parts (and a not very compelling attempt to work around them)" I'd probably feel like I got my money's worth.
A must read for any programmer using JavaScript.