3 ms·
The article is all about concurrency, but to me that would just be a bonus if it happens to be easier. The main benefit that functional programming appears to
by Falkon1313 10y ago
The article is all about concurrency, but to me that would just be a bonus if it happens to be easier.
The main benefit that functional programming appears to claim is that you can spend much less time resolving bugs like "I got home and my dog had turned into a zebra for some reason!" Eventually tracking it down to the fact that if a neighbor on the left changes a tire on a certain stretch of highway during the week of a full moon, then their neighbor's dog will turn into a zebra. Not for any rational reason, not because anyone intended that to happen, but because no one happened to think to explicitly prevent it in the interactions between shared mutable loosely-typed state and layers of indirection and abstraction.
I don't know yet whether functional programming really helps with that, but it sounds like FP would make it a lot more difficult to end up with situations like that. It does however make me wonder what the annoying types of common bugs are in functional programming that a future paradigm will try to prevent...