|
|
|
|
|
by norswap
3669 days ago
|
|
First, functional programming is an umbrella term. This paper talks about strict FP, which is basically "no mutation", so I'll talk about that. It's clear that some other aspects of FP, such as first-order functions, closures, etc are very useful in practice. Immutability does have its advantages in that it supplies strong guarantees about what your code does. It avoids spaghetti code where everything can and does mutate everything else. Myself, I tend to use whenever its advantages outweigh its inconveniences. Immutability is especially handy at interface boundaries. |
|