3 ms·
In the OOP way you create controller classes. In the FP way you pass lambdas/functions. So yes, it’s not 100% functional. But probably 80%?
by andix 5y ago
In the OOP way you create controller classes. In the FP way you pass lambdas/functions.
So yes, it’s not 100% functional. But probably 80%?
- LAC-Tech 5y agoYou're creating an instance of an app class, calling methods on it, and passing objects in that method (string and lambda are objects). I just feel like the term OOP can't win here. If it's concise people will just claim it's FP.
- andix 5y agoOff course there is still OOP involved. Also most FP languages support objects to some extent. Also records and their modules have some similarities to OOP. And even FP can be never completely pure, there always has to be state. But this approach is just more functional than the one before.