<story><title>Nerdsniping: A glimpse into a stubborn mind</title><url>https://blog.andyet.com/2014/04/07/nerdsniping</url></story><parent_chain><item><author>mncolinlee</author><text>And this is why Javascript can be such an awful language. Leaving off a single equals has such a profound effect, often without a new coder even realizing it while reading the code.&lt;p&gt;Imagine what happens to your code when someone tries to write a function for its side effects similar to the example seen in the blog post. Then releases it in production for it to break in six months with a feature change.</text></item></parent_chain><comment><author>briantakita</author><text>&amp;gt; And this is why Javascript can be such an awful language. Leaving off a single equals has such a profound effect, often without a new coder even realizing it while reading the code.&lt;p&gt;You get used to this as you get seasoned with javascript. Every language has it&amp;#x27;s quirks. The human brain is remarkably adaptable to using tools &amp;amp; dealing with intricacies. I personally utilize &amp;amp; appreciate the difference between == and === to reduce complexity in the code. I assume the reader also understands such differences.&lt;p&gt;I also find automated testing, logging, a module system like commonjs, and linters to be useful when programming in javascript. Once these are in place, systems written in javascript are remarkably maintainable &amp;amp; scale with complexity.</text></comment>
<story><title>Nerdsniping: A glimpse into a stubborn mind</title><url>https://blog.andyet.com/2014/04/07/nerdsniping</url></story><parent_chain><item><author>mncolinlee</author><text>And this is why Javascript can be such an awful language. Leaving off a single equals has such a profound effect, often without a new coder even realizing it while reading the code.&lt;p&gt;Imagine what happens to your code when someone tries to write a function for its side effects similar to the example seen in the blog post. Then releases it in production for it to break in six months with a feature change.</text></item></parent_chain><comment><author>maxbucknell</author><text>At the end of the article, it is demonstrated that this can happen even with strict equality by overriding the getters. Any language with getter&amp;#x2F;setter support can do this. Operator overloading can be used for even nefarious ends.&lt;p&gt;The point is that side effects in code are dangerous, and can be used to mislead a reader.&lt;p&gt;If this happens, it is not the fault of JavaScript. Anyone who writes code like that for purposes other than demonstration or learning is a moron.</text></comment>