4 ms·
Template Haskell is not standard Haskell, it is an extension. But even with it, Haskell type system can't reason about lifetimes of objects. It doesn't give an
by pkolaczk 7y ago
Template Haskell is not standard Haskell, it is an extension. But even with it, Haskell type system can't reason about lifetimes of objects. It doesn't give any guarantees about object destruction nor even object construction, due to laziness. Hence, you can't prove anything about resource usage of a Haskell program. Which makes it usable only for cases where you don't care about resources and where the program doesn't interact with external systems.
- hopia 7y agoWell Haskell's prelude is purposefully small and extended by a variety of extensions in the GHC. Prelude + libs + extensions effectively make what we call Haskell today. Just like with Elixir and many other high level languages I don't think it's meant for building low level systems where you're heavily constrained by resources. But why wouldn't it be able to interact with external systems? I'm not having any problems building an API that interacts with a database, caching layer etc.