In non functional languages like JS here, FP is for sure slower.
Whether that's important in your space is up to you. I've found that thinking about performance first over code quality has resulted in less performant code for other reasons.
And you can achieve asymptotically equally performant code using libraries or languages built for this style of programming. Given that functional programming isn't really taught, however, that's not the norm.
For further actions, you may consider blocking this person and/or reporting abuse
We're a blogging-forward open source social network where we learn from one another
Can you also mention the time and space complexity of both methods? I think the functional approach has higher time complexity than imperative ?
In non functional languages like JS here, FP is for sure slower.
Whether that's important in your space is up to you. I've found that thinking about performance first over code quality has resulted in less performant code for other reasons.
And you can achieve asymptotically equally performant code using libraries or languages built for this style of programming. Given that functional programming isn't really taught, however, that's not the norm.