by verttii · 7y ago · 0 comments
Haskell's compiler is incredibly strict. It'll guide you until the code is near bullet proof. The outcome is that the surface area where things can go wrong is relatively a lot smaller than in just about any other language our there.
https://stackoverflow.com/questions/40130014/why-is-haskell-...
I don't know what's wrong about thinking about expressions as declarative which in my opinion they are. How would thinking about expressions imperatively help me avoid those exponential runtime costs?
For example consider the list comprehension: [toUpper c | c <- s]
If you compare this with your typical imperative for loop to construct the same data structure I find this declarative.