<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Paradigms on Ghafoor's Personal Blog</title><link>https://ghafoorsblog.com/tags/paradigms/</link><description>Recent content in Paradigms on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>hello@ghafoorsblog.com (AG Sayyed)</managingEditor><webMaster>hello@ghafoorsblog.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sun, 24 May 2026 09:13:13 +0100</lastBuildDate><atom:link href="https://ghafoorsblog.com/tags/paradigms/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Understand Functional Programming in JavaScript</title><link>https://ghafoorsblog.com/posts/js/07-functional-programming/</link><pubDate>Mon, 01 Sep 2025 08:00:00 +0000</pubDate><author>hello@ghafoorsblog.com (AG Sayyed)</author><guid>https://ghafoorsblog.com/posts/js/07-functional-programming/</guid><description>&lt;h2 id="programming-paradigms-in-one-paragraph"&gt;Programming paradigms in one paragraph&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;paradigm&lt;/em&gt; is a style of organising programs. JavaScript happily supports four:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Imperative&lt;/strong&gt; — describe the steps the computer takes (&lt;code&gt;for&lt;/code&gt; loops, mutable state).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedural&lt;/strong&gt; — group steps into named procedures (functions called for their side effects).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Object-oriented&lt;/strong&gt; — bundle data with the methods that operate on it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functional&lt;/strong&gt; — model computation as the evaluation of pure functions, prefer immutable data, and compose small functions into larger ones.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;JavaScript is sometimes called &lt;em&gt;multi-paradigm&lt;/em&gt; because nothing in the language forces a single style. But its first-class functions, closures, and rich array methods make the functional style especially natural — and increasingly popular in front-end frameworks (React, Solid) and back-end ecosystems (RxJS, fp-ts).&lt;/p&gt;</description></item></channel></rss>