by scriptkiddy · 9y ago · 0 comments
I think OOP is a better way to build an ORM. That said, the query constructors might benefit from a FP approach.
I think FP is a better way to build a mathematics library. That said, data structures might be better represented as objects.
It really depends on the specific application.
I also want to clarify that OOP does not necessarily require inheritance and such.
data Address = Address
{ city :: String
, street :: String
}
data Person = Person
{ name :: String
, address :: Address
}
My general impression of recent-ish OOP developments is that people have started preferring composition over inheritance anyway, for good reasons. I guess I should've framed by question more like "the merits of inheritance over composition".