Functional programming
Functional programming (often abbreviated FP) is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects. Functional programming is declarative rather than imperative, and the application state flows through pure functions. Contrast with object-oriented programming, where application state is usually shared and colocated with methods in objects.
Functional programming is a programming paradigm, meaning that it is a way of thinking about software construction based on some fundamental, defining principles (listed above). Other examples of programming paradigms include object-oriented programming and procedural programming.
It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements
The difference between Imperative and Declarative programming is related to how a program works vs. what a program does. Imperative programming is about how a program works while Declarative programming is about what a program does.
An engineer who can write short and expressive code (as one expects in Ruby or Python) while also delivering a type-safe and high-performance application (as one expects from Java or C++) would be considered both impressive and valuable. You’ll be able to take full advantage of Scala’s functional programming features, deliver type-safe and expressive code, and be more productive than you have ever been.
You will be able to start using functional programming techniques to stabilize your applications and reduce issues that arise from unintended side effects. By switching from mutable data structures to immutable data structures and from regular methods to pure functions that do not affect their environment, your code will be safer, more stable, and much easier to comprehend.