<story><title>Functional programming in JavaScript is an antipattern</title><url>https://hackernoon.com/functional-programming-in-javascript-is-an-antipattern-58526819f21e</url></story><parent_chain></parent_chain><comment><author>coldtea</author><text>Funny, but HN oldsters probably remember when functional programming wasn&amp;#x27;t at all tied to immutable data structures, and when Lisp and derivatives where considered enough functional programming, without every discussion of the topic requiring strictly requiring purity and immutability -- just first class functions, map, fold, and the like.</text></comment>
<story><title>Functional programming in JavaScript is an antipattern</title><url>https://hackernoon.com/functional-programming-in-javascript-is-an-antipattern-58526819f21e</url></story><parent_chain></parent_chain><comment><author>lewisl9029</author><text>I wouldn&amp;#x27;t go as far as to call it an anti-pattern, but the lack of native persistent data structures does make functional programming a decidedly second-class citizen in the JS world.&lt;p&gt;We can either choose to use a library like ImmutableJS instead of regular JS objects and suffer the impedance mismatch and exponential increase in verbosity, or use regular JS objects and make full copies every time we want to change any piece of data.&lt;p&gt;It&amp;#x27;s a very unfortunate blemish on an otherwise surprisingly pleasant experience (functional programming in JS), especially when paired with a nice utility library like Ramda [1].&lt;p&gt;I tried to look into if native persistent data structures was on the roadmap for a later version of ECMAScript, but this random proposal on GitHub [2] was the only thing I could find, and I&amp;#x27;m not familiar enough with the standardization process to be able to gauge how much traction that proposal is getting.&lt;p&gt;If anyone else is aware of similar efforts, I&amp;#x27;d love to hear about them.&lt;p&gt;Until something like this makes it into JS proper, I&amp;#x27;ll be putting my weight behind ClojureScript.&lt;p&gt;[1] &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;ramdajs.com&amp;#x2F;docs&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;ramdajs.com&amp;#x2F;docs&amp;#x2F;&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;sebmarkbage&amp;#x2F;ecmascript-immutable-data-structures&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;sebmarkbage&amp;#x2F;ecmascript-immutable-data-str...&lt;/a&gt;</text></comment>