Programming Language Paradigms: From Imperative to Functional

Programming Language Paradigms: From Imperative to Functional Programming languages help us organize how we solve problems. Two core families are imperative and functional languages. Imperative programming describes how to change state through a sequence of commands: create a variable, update it in loops, and finally produce a result. Functional programming, by contrast, emphasizes what to compute through pure functions and often avoids changing data outside a function’s scope. A simple task, like summing the numbers from 1 to 10, highlights the contrast. In an imperative style, you start with total = 0, loop over each number, add it to total, and then present total. In a functional style, you describe the goal and compose steps: generate the list 1..10, then apply a reducer that adds each item to an accumulator, yielding the same result without mutating shared state. ...

September 22, 2025 · 2 min · 417 words

Functional Programming in Practice

Functional Programming in Practice Functional programming (FP) asks you to build software from small, predictable parts. By using pure functions and data that does not change, you can reduce bugs and make behavior easier to understand. Core ideas are simple. Pure functions return the same result for the same inputs and have no side effects. Data is usually immutable, so a value never changes after it is created. Functions are first class: you can pass them as arguments, return them from other functions, or store them in variables. When small functions are combined, you get powerful behavior through composition. ...

September 21, 2025 · 2 min · 342 words