|
|
|
|
|
by hota_mazi
3404 days ago
|
|
> All of these abstractions, when rarely they are actually needed to express a program, can be naturally expressed within the type system, in a proper functional language. If you think FP is mutually exclusive with OOP, you understand neither. OOP is very powerful to organize the architecture of your code and capture very common patterns such as reusing an existing piece of five functionalities while overriding one (something that's still awful to achieve in FP, regardless of the language you pick). FP operates at a more granular level, basically how you implement your methods. And by the way, FP has design patterns as well. FP and OOP are extremely complementary. |
|
This is not true, ad hoc polymorphism works fine without subtype polymorphism.