Re:Disadvantages of purely functional programming
by DrJokepu on Sunday June 05, 2016 @12:48PM
(#11841799)
I agree that immutability is very useful, but you don't really need any kind of FP to use immutability, do you?
Re:Disadvantages of purely functional programming
by braythwayt on Tuesday June 07, 2016 @09:15AM
(#11854226)
If your data is immutable, in what sense is your code not 'Functional Programming?'
"It's OO, and it can't be both OO and FP."
Hmmm.
Re:Disadvantages of purely functional programming
by 33degrees on Sunday June 05, 2016 @01:10PM
(#11841910)
I was going to say the same thing; it's certainly possible to write immutable object oriented code
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.