Scala best practice: Think "Expression-Oriented Programming"
Briefly

In Expression-Oriented Programming (EOP), the philosophy emphasizes using expressions that return values rather than relying on statements that execute for side effects alone.
Statements do not return results; they are executed merely for their side effects. On the contrary, expressions always yield a result, often devoid of side effects, positioning EOP as an influential programming paradigm.
Understanding the distinction between statements and expressions is crucial for learning Scala, as transitioning to an expression-oriented mindset can vastly improve the efficiency and clarity of your code.
All pure functional programming languages exemplify the characteristics of expression-oriented programming, enhancing modularity and reusability in code design.
Read at Alvinalexander
[
]
[
|
]