|
|
|
|
|
by lame88
2617 days ago
|
|
It's more complicated than "FP or not". Languages like Haskell isolate state and IO. But the mechanisms are there, and Haskell was intended to do it; it's just formalized and very strict. There are FP languages that don't have this pure separation (I believe OCaml and Scala mix IO freely), and that's more at the core of where the friction might be of interacting with a database rather than FP itself. I would often not use Haskell for database-related stuff, I agree, but it's more because I often do no require the level of strictness that the type system enforces in all my database interactions such that it would be worth the investment. But if you're doing mission-critical stuff, it may be worth getting the safety guarantees. |
|