3 ms·
> Well, in the sense that garbage collectors solve memory management. But pure functional programming in the Haskell sense doesn't really manage file handles fo
by valenterry 2y ago
> Well, in the sense that garbage collectors solve memory management. But pure functional programming in the Haskell sense doesn't really manage file handles for you, or database connections.
No, I was actually talking about the latter and not about memory management at all.
In Scala we even achieve this on the library level. (e.g. https://zio.dev/reference/resource/ https://zio.dev/reference/resource/ which also compares the existing problematic try/catch with its own approach)
And despite Scala being strict, the GC still makes it unsuitable for many cases where you just need something like Haskell.