HighlightsUberto Barbini asserts functional programming boosts code quality via immutable data, pure functions. Functional programming simplifies testing, enabling techniques like property testing for thorough validation. AI agents perform better with modular, clear functional codebases due to reduced context needs. A multi-layered testing strategy, including AI-assisted mutation and end-to-end tests, enhances quality.
Uberto Barbini, an experienced software developer, advocates for functional programming in the age of AI agents, according to an InfoQ discussion.
He transitioned to functional programming approximately 10 years ago after extensive work with object-oriented languages like Java and JVM-related languages. Barbini noted that his primary goal in programming is to deliver customer value efficiently, which drove his adoption of functional paradigms.
Functional programming’s core tenets involve immutable data and pure functions, which only use arguments and produce explicit results. This explicit approach simplifies function composition, making it easier to understand impacts and debug or modify code.
Barbini observed that testing becomes significantly easier with functional programming because classes are immutable and functions have clear inputs and outputs. This facilitates advanced testing techniques like property testing, where frameworks generate values to verify invariants across numerous runs.
The programming landscape is increasingly adopting functional elements; Java now includes Lambdas and streams, Kotlin is more functional-friendly, and Rust uses ‘Result’ instead of exceptions, he stated.
AI Agents and Code QualityBarbini believes code quality remains crucial even with AI agents, as agents are more efficient and produce better results on well-structured codebases. Modularization and clearly defined functions particularly assist agents by reducing the context they need to manage.He explained that agents struggle with abstractions such as interfaces of interfaces or complex inheritance hierarchies. Well-defined classes and modules, however, enable agents to maintain consistent quality, reducing errors from complicated code.
Working with AI agents requires a multi-layered approach to quality assurance, similar to a “Swiss cheese model” of security, Barbini noted. This includes using linters, grep-like checkers, deterministic test coverage, and mutation testing.
He also employs agents to check code against requirements, verify test coverage, and summarise pull requests for human review. This layered control allows human developers to focus on higher-level abstraction tests that agents still find challenging.Testing Strategies and Future DangersBarbini prefers a testing strategy that incorporates end-to-end tests for critical functionality, integration tests for external APIs and databases, and unit tests for core logic. AI can accelerate the creation of these tests, including complex mutation and end-to-end tests, which were traditionally resource-intensive.
He identified several dangers in coding with agents, including over-reliance without critical engagement and the potential for developers to lose their sense of craftsmanship. Barbini advises young developers to use AI for learning and understanding code rather than merely generating it without comprehension.
Published On Dec 1, 2026 at 04:55 AM IST
Join the community of 2M+ industry professionals.
Subscribe to Newsletter to get latest insights & analysis in your inbox.
Get updates on your preferred social platform
Follow us for the latest news, insider access to events and more.