News for hackers. Stuff that matters.
Re:What I Wish I Knew When Learning Haskell by kadoban on Saturday April 11, 2020 @10:17AM (#22841790)
There's escape hatches here and there. If you need imperative code, use IO or ST. If you need to debug output something, Debug.Trace.

If you need to temporarily bypass purity there's unsafePerformIO and friends (or they can occasionally be used permanently if you do a lot of analysis I believe).

It's a pretty practical language compared to its reputation.

Re:What I Wish I Knew When Learning Haskell by Koshkin on Saturday April 11, 2020 @03:16PM (#22843505)
Actually, someone said, “Haskell is the world’s best imperative programming language.”
Re:What I Wish I Knew When Learning Haskell by sullyj3 on Sunday April 12, 2020 @10:24AM (#22848426)
Somebody said it, but it's glib, and not particularly true. I believe it was a comment on do notation, the bind operation, and programmable semicolons. The customizability is definitely cool, but nobody could possibly argue that imperative programming in Haskell is ergonomic.
Re:What I Wish I Knew When Learning Haskell by sullyj3 on Sunday April 12, 2020 @10:21AM (#22848408)
Sure, IO and ST are escape hatches, but they're not escape hatches that beginners struggling with the concept of a higher order function are going to be able to use.