Topic

Immutability

All digests tagged Immutability

Functional Programming with the aid of AI - Venkat Subramaniam - NDC Oslo 2026 thumbnail

· 1:00:38

Functional Programming with the aid of AI - Venkat Subramaniam - NDC Oslo 2026

This technical talk explores Functional Programming (FP), arguing that FP is a powerful subset of declarative programming that emphasizes functional composition and immutability. The presentation shifts focus to the role of AI in generating functional code, warning that while AI can accelerate development, it is an 'amplifier' of existing knowledge. The speaker emphasizes that human expertise is crucial for validating, refining, and correcting AI-generated code, as relying solely on AI without fundamental knowledge can lead to significant errors.

Key takeaways

  1. Functional Programming (FP) vs. Imperative Style 5:50

    Imperative style requires specifying *how* to achieve a result (e.g., detailing every loop step and condition). Declarative style, conversely, specifies *what* is desired, delegating the 'how' to underlying libraries (e.g., using `names.contains` instead of manual looping). FP is a subset of declarative style, adding the power of higher-order functions and functional composition.

  2. Functional Composition and Core Principles 11:40

    The power of FP comes from functional composition—building complex functions from smaller ones. Key concepts include: 1) **Higher-Order Functions (HOFs):** Functions that can accept or return other functions. 2) **Functional Composition:** Combining functions using patterns like `filter`, `map`, and `reduce`. 3) **Immutability and Lazy Evaluation:** These are essential for correctness and performance in FP, as they prevent unnecessary computation and side effects.

  3. AI as an Amplifier, Not a Replacement 26:40

    The speaker argues that AI is an 'amplifier' that amplifies both positive and negative knowledge. While AI can generate complex code quickly, its output is based on inference from its training data (which is largely human-written, and thus, imperfect). The onus remains on the experienced programmer to validate, critique, and refine the code, or risk accepting incorrect or overly complex solutions.

  4. The Danger of Ignorance with AI 35:00

    The primary warning is that AI will not cover a lack of fundamentals. If a developer is unfamiliar with the underlying principles (like FP), they may accept AI-generated code without realizing its flaws, leading to a greater risk than writing the code manually.

Watch on YouTube Full article