Review: YDKJS Scopes & Closures

This is a new series where I review a programming book I have read. I will usually issue a review within a few days of reading it. This one is late because I just decided to do this series.

First, let me say that I am a big fan of Kyle Simpson's pragmatic teaching style. I read You Don't Know JS: Up & Going (opens in a new tab) a couple years ago and it changed my understanding of JavaScript at that time.

Since reading that book1 I have a more solid grasp on JavaScript fundamentals than ever before. I expected to learn something that I had been missing in learning those fundamentals and I did. However I was disappointed in Kyle's dogmatism about const, let and var and how and when to use them.

This was an issue in the first book as well. I understand some of the quirks when using syntactic sugar such as let and const especially when destructuring arrays. But we are far safer for them than we are without them.

Here is a bit of what I am talking about on this issue:

This is a legitimate concern. But the conversation that followed made me question Kyle's openness to new ideas:

Opposing Viewpoints

Ben Lesh, who is a fantastic champion of RxJS and functional programming tweeted this:

Admittedly, he could have avoided the passive aggressive jab at Kyle at the end but I agreed with this tweet.

JavaScript is a wild language that was written with some poor design choices. To ignore that fact is fatal; I don't think you can teach someone fundamentals without pointing out these design choices that make JavaScript sometimes hard to work with.

JavaScript is a beautiful language. I enjoy writing it. And I learned more technical lessons about the language I love by reading this book. But, the concepts in the book are sometimes obfuscated by Kyle's dogmatic insistence on old conventions. I don't think he is aware how it comes across to people like me with intermediate skills trying to become more technical. It detracted from an otherwise crucial book to read when learning JS.

Footnotes

  1. That's the first in the series.

© tiff.RSS