<story><title>Why is learning functional programming so damned hard? (2019)</title><url>https://cscalfani.medium.com/why-is-learning-functional-programming-so-damned-hard-bfd00202a7d1</url></story><parent_chain><item><author>IIAOPSW</author><text>What makes you say &amp;quot;port&amp;quot; and &amp;quot;starboard&amp;quot; are more clear than &amp;quot;front&amp;quot; and &amp;quot;back&amp;quot;?</text></item><item><author>swiley</author><text>Programming is about clearly communicating theory.&lt;p&gt;Mariners use &amp;quot;port&amp;quot; and &amp;quot;starboard&amp;quot; for vehicle relative directions not because it&amp;#x27;s &amp;quot;cool&amp;quot; but because it&amp;#x27;s clear and unambiguous. Problem decomposition works the same way: some problems decompose better with FP (I would argue databases do) some with OOP, some with EF etc. The more you know the clearer code you can write and the faster you can extract the theory from other people&amp;#x27;s code.</text></item><item><author>yodsanklai</author><text>It&amp;#x27;s not hard at all. It&amp;#x27;s routinely taught to beginners.&lt;p&gt;However, it&amp;#x27;s not a silver bullet. I found that basic software engineering principles are way more important than the language. I&amp;#x27;ve seen extremely messy OCaml code and super clean C code. What is important is how the code is organized at high level. Whether you use a for loop or a fold, an error monad or an exception mechanism matters less.&lt;p&gt;I&amp;#x27;m also wary of functional programming gurus that tend to over-abstract things and use all the language latest features, making code very hard to read.&lt;p&gt;Also, when developing in a niche language, you tend to miss important tools and need to rely on unstable third-party libraries.&lt;p&gt;I used to be quite enthusiastic about FP, but I think I&amp;#x27;d stick with more mainstream languages unless there&amp;#x27;s a good reason not to.</text></item></parent_chain><comment><author>jyounker</author><text>&amp;quot;Port&amp;quot;, &amp;quot;starboard&amp;quot; are unambiguously defined relative to the vessel.  &amp;quot;Left&amp;quot; and &amp;quot;right&amp;quot; require specifying or guessing a point of reference.&lt;p&gt;For instance if you&amp;#x27;re facing port and I ask you to take two steps forward, you could either take two steps to port or two steps towards the bow. If I tell you to take two steps to port then the direction is unambiguous.</text></comment>
<story><title>Why is learning functional programming so damned hard? (2019)</title><url>https://cscalfani.medium.com/why-is-learning-functional-programming-so-damned-hard-bfd00202a7d1</url></story><parent_chain><item><author>IIAOPSW</author><text>What makes you say &amp;quot;port&amp;quot; and &amp;quot;starboard&amp;quot; are more clear than &amp;quot;front&amp;quot; and &amp;quot;back&amp;quot;?</text></item><item><author>swiley</author><text>Programming is about clearly communicating theory.&lt;p&gt;Mariners use &amp;quot;port&amp;quot; and &amp;quot;starboard&amp;quot; for vehicle relative directions not because it&amp;#x27;s &amp;quot;cool&amp;quot; but because it&amp;#x27;s clear and unambiguous. Problem decomposition works the same way: some problems decompose better with FP (I would argue databases do) some with OOP, some with EF etc. The more you know the clearer code you can write and the faster you can extract the theory from other people&amp;#x27;s code.</text></item><item><author>yodsanklai</author><text>It&amp;#x27;s not hard at all. It&amp;#x27;s routinely taught to beginners.&lt;p&gt;However, it&amp;#x27;s not a silver bullet. I found that basic software engineering principles are way more important than the language. I&amp;#x27;ve seen extremely messy OCaml code and super clean C code. What is important is how the code is organized at high level. Whether you use a for loop or a fold, an error monad or an exception mechanism matters less.&lt;p&gt;I&amp;#x27;m also wary of functional programming gurus that tend to over-abstract things and use all the language latest features, making code very hard to read.&lt;p&gt;Also, when developing in a niche language, you tend to miss important tools and need to rely on unstable third-party libraries.&lt;p&gt;I used to be quite enthusiastic about FP, but I think I&amp;#x27;d stick with more mainstream languages unless there&amp;#x27;s a good reason not to.</text></item></parent_chain><comment><author>swiley</author><text>The alternatives are left and right respectively. They&amp;#x27;re more clear because left and right are usually relative to the speaker or listener who may be facing each other and are often moving around.</text></comment>