Glossary · Automation software engineering and architecture
Functional programming
German: Funktionale Programmierung
In software engineering, functional programming is a programming paradigm that builds programs from functions that map inputs to outputs, favoring pure functions without side effects, immutable data and the composition of functions over changing state step by step.
- Software engineering
In one sentence
Functional programming builds programs from pure functions, immutable data and function composition rather than changing state.
Example
A data pipeline on the edge gateway transforms raw sensor records through a chain of pure functions for filtering, scaling and aggregation, each tested independently.
How it applies
- Engineering: Functional techniques are available in many general-purpose languages, such as Python, C#, Java, Kotlin and Rust, and are common in data processing, analytics and configuration tools. Pure functions are easy to test and safe to run concurrently.
- Automation context: Control programs are inherently stateful, so PLC code is not functional in the strict sense. Still, IEC 61131-3 functions, which have no internal state, follow the same idea as pure functions, and separating stateless calculations from stateful logic improves testability.
- Documentation: For functional code, document the input and output of each function, including units and valid ranges. Pure functions are well suited to generated reference documentation and examples.
Functional vs. object-oriented programming
Object-oriented programming organizes code around objects that bundle state and behavior, using Encapsulation and Inheritance. Functional programming minimizes shared mutable state. Many modern codebases combine both styles.