News for hackers. Stuff that matters.
Re:Haskell Fan Site by verttii on Monday June 24, 2019 @12:30AM (#20260567)
The refreshing part about Haskell to me is that it is declarative. It feels more natural to describe what you want to happen than to try to think like a machine and compose sequential machine instructions for it each of which can fail at any execution.

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.

Re:Haskell Fan Site by pwodhouse on Monday June 24, 2019 @08:42AM (#20262921)
Haskell is not declarative. It is a specific form of lazy + graph-reductive. Thinking of it as declarative leads to polynomial exponential runtime cost in CPU/memory and not understanding why or how to fix it.

https://stackoverflow.com/questions/40130014/why-is-haskell-...

Re:Haskell Fan Site by verttii on Monday June 24, 2019 @09:30AM (#20263355)
I'm not talking about the compiler or the evaluation. From programmer's perspective the language does seem fairly declarative to me, mostly consisting of expressions instead of statements.

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.