DEV Community

Discussion on: Mutation is ok

Collapse
 
macsikora profile image
Pragmatic Maciej

Hi Phil,
Thanks for the comment.

Internal mutation falls apart if others can attempt to extend/get-inside

Extending function is not a common practice in FP. We more should strive for small replaceable units. Instead of adding new use cases to the unit we should compose it with another. Until we keep them small even imperative code should not be any issue.

Ensuring that referential transparency is maintained is harder to prove

Again the same counter argument from my side. Until we keep functions small with one responsibility, nothing like that should happen.