Review: YDKJS Scopes & Closures | Tiffany R. White Blog

Review: YDKJS Scopes & Closures

Reading time: 3 mins

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 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.

  1. That’s the first in the series. 


Share

No Ads. No Sponsored Content. Ever.

I've decided that I no longer want to have sponsored posts on this blog. I also, though as tempting as it may sound, don't want ads; even if I got big enough for Carbon ads I don't want them. I want to post free, engaging content for beginning/junior devs. This means that I won't have Setapp posts or affiliates on this blog, though I will keep them on the Uses page. If you enjoy the content, buy me a coffee. Just click the button below.


Coffee Buy me a coffeeBuy me a coffee


Webmentions 1

  1. I always thought let and const were scapegoats. If you fully understand javascript, scoping shouldn’t be a problematic topic. I like your article however

Newsletter