News for hackers. Stuff that matters.
Re:What I Wish I Knew When Learning Haskell by masklinn on Saturday April 11, 2020 @07:17AM (#22841077)
> it's followes a purely functional programming paradigm

I'd say that it's one take on that paradigm, the Way of Monads is not the only way to do purely functional, Clean uses uniqueness typing instead. Though it otherwise has rather similar properties to Haskell.

Re:What I Wish I Knew When Learning Haskell by yeshengm on Saturday April 11, 2020 @08:00AM (#22841204)
I'd say start with some eager functional language such as OCaml without the "object" part. Haskell code is hard to debug cuz you can't rely on good old print.

Monad itself is never a silver bullet. Type systems and Composability are the true power of FP IMO.

Re:What I Wish I Knew When Learning Haskell by willtim on Saturday April 11, 2020 @08:11AM (#22841244)
Debugging declarative code is always hard, whatever the language. Haskell does allow you to use trace expressions which will output values to standard out, see Debug.Trace.

This is no reason to avoid arguably the most popular (and state-of-the-art) function language and implementation out there.

Re:What I Wish I Knew When Learning Haskell by bontaq on Saturday April 11, 2020 @09:15AM (#22841501)
It took me way too long to come across Trace, if it was more widely known I don't think we'd see so many "impossible to debug" related issues. It's great.
Re:What I Wish I Knew When Learning Haskell by marceloabsousa on Saturday April 11, 2020 @08:34AM (#22841327)
I think we can all agree that debugging languages with lazy evaluation is specially hard. To effectively use Debug.Trace you actually need to add strictness and that can be fundamentally incompatible if you do intend to use the full power of lazy evaluation.
Re:What I Wish I Knew When Learning Haskell by lonelappde on Saturday April 11, 2020 @08:51AM (#22841409)
Debug.Trace won't solve the space leaks lurking around every corner of your program, and won't shave the hundreds of megabytes to gigabytes of RAM the compiler needs for compiling a non trivial program with dependencies.
Re:What I Wish I Knew When Learning Haskell by hopia on Saturday April 11, 2020 @10:16AM (#22841786)
It's for runtime debug logging after all, not intended to solve those issues.

Space leaks I'd like to read more about but writings about them are a bit hard to come by. Recommendations?