Interview with Kyle Simpson, author of You Don’t Know JS book series
medium.com
medium.com
This line of poor reasoning is responsible for so much lost productivity and buggy code. Even in the best case where a team is comprised of people who understand these intricacies well it still forces people to spend more time thinking about simple equality checks than necessary. The greater verbosity of === and type conversion is less mental effort.
In the real world very few people understand == and there's a good chance that even if you do whoever maintains the program you wrote won't. It's just not worth it.
This is very similar to the argument that you should use the minimum number of semicolons necessary in JS. You just need to memorize the exact syntax. It's an aesthetic argument only. It does nothing for the metrics that matter, like defect rate, maintainability, comprehension, etc.
This can lead to endorsing advanced features instead of simple easily composable ones. The advanced features will be poorly adopted in the field due to not everyone being an expert.
This is probably the best single thing about golang. The language has many flaws, but this is not one of them.
From this interview, it sounds like he agrees, but can't help giving advice sometimes.
This might be the most irresponsible thing I've heard a JS expert say in a while. If you are competent enough to say, write a book on JS then maybe you can keep the cognitive wherewithal to track your states getting coerced left and right into totally different types etc. If you are a mere mortal like me, you want to pin everything you can down behind strong data contracts and know that they are going to stay what you set them at. When I write code, I want to communicate intent. When I assert that this var should definitely be of type `bool|string|object|array` etc. I give the person reading my code one less thing to have to keep in their head.
Some programmers want to write sophisticated (and sometimes very concise) code that requires deep understanding of the programming and sometimes reads like a "programming puzzle game" / Interview trick question.
Then there are the pragmatic types, which prefer simple code with a reductionalist approach. The code is easy to read but it is often not very generic and tends to get longer / repeated.
I can also see why Kyle Simpson doesn't like TypeScript, because it fits more the latter mindset. I've also seen competent and productive programmers of both types.
Has anyone experiences how those different approaches go together in a single team? To me it seems very difficult to come to a compromise or agreement here.
Also, having been following Simpson for some time, I believe him when he tried to clarify later that this wasn't from a place of ego. Rather, it's because he's written and talked so much about JavaScript that he's bound to have also forgotten a lot also.
Still, it was a poor choice of words to try to express that, and made worse by the article using that as it's headline.
A slightly nicer quote
"The Japanese had forgotten more neurosurgery than the Chinese had ever known"
In the book Case was trying to explain that the japanese had been studying neurosurgery for so long that they had forgotten many things which had become obsolete, an amount of knowledge which turned out to be more than the chinese had ever known.
Having read YDKJS and seen some of Mr. Simpson's talks, I do believe that he is qualified to make such a claim about himself.
The idiom is common and predates Neuromancer:
> "I Forgot More Than You'll Ever Know" is a number one country music single for The Davis Sisters in 1953.
https://en.wikipedia.org/wiki/I_Forgot_More_Than_You%27ll_Ev...
I really appreciate the country love-song context; it is both interesting and amusing.