3 ms·
It's a bit of a canard. The benefits of FT are mostly things like statelessness, no side effects. And it's almost better to talk about it in those terms, and
by jasmer 4y ago
It's a bit of a canard.
The benefits of FT are mostly things like statelessness, no side effects.
And it's almost better to talk about it in those terms, and introduce concepts into imperative programming.
When people say 'functional core (aka libs) and imperative for the rest' it's ultimately what they mean.
Applying FP universally creates weird code and it becomes pedantic and ideological.
I wouldn't even use the example in the article almost nothing is gained.
Try to reduce state, use immutable objects as much as possible / where reasonable, make reusable function which naturally have fewer side effects etc..
I think that the material benefit of FP is in partial application of some elements of it, and unfortunately that doesn't create nice academic threads for people to talk about. It's more like applied know-how, than theory.
- canadianfella 4y agoWhat do you mean by “canard”?
- zabzonk 4y agofalse report