|
|
|
|
|
by ithkuil
4579 days ago
|
|
The elegance of immutable local variables is interesting, and it can be argued that functional programming style can lead to more robust coding. However, there is an orthogonal advantage of immutable (or persistent) data structures, namely simplify sharing of state in concurrent programming, and this works well regardless on where the "handle" of a data structure is stored. |
|
These decisions must be made pragmatically and being ideological about it isn't very useful. Scala is a great language for both functional and imperative programming when you need it.