News for hackers. Stuff that matters.
Re:Is Haskell really the language of geniuses and academia? ... by verandaguy on Saturday August 20, 2022 @12:24AM (#32529066)
>But, articles explaining the core use cases and how only this language enabled solving it are rare

From my (limited) experience with Haskell, my impression is that it's strongest in domains that map _very_ well to formal mathematical models. Mathematical computation is an obvious example, but things like programming language parsers are also really intuitive to build in Haskell.

My experience trying to use Haskell for other stuff — mainly, building web backends, my bread and butter back then — was painful. Simple CRUD against a database is actually pretty decent thanks to there being decent Postgres drivers and libraries, but the moment you need to handle arbitrarily-nested data structures (like a JSON request/response with a nontrivial schema), you run up against a lot of awkwardness, to the point that for the longest time this was known in Haskell as the "records problem."

Lenses and similar tools have tried to solve this problem over the years, and maybe they have, but I moved on from the language when I saw how deep that rabbit hole went.

None of this is to say Haskell isn't fun or rewarding, but it definitely has its strengths and weaknesses.

Re:Is Haskell really the language of geniuses and academia? ... by kqr on Saturday August 20, 2022 @01:15AM (#32529306)
I'm having trouble understanding what your actual point of criticism is.

The records problem is basically a small syntactical quirk. Undesirable, yes, but not what will make or break production software development.

Lenses solve some of that and much more. Lenses strictly improve on fields/records/getters/setters/etc. in any other language you know. In other words, they accomplish what they do and then some.

If that was your only problem with Haskell, then it might be one of your favourite languages if you get to know it again.

Re:Is Haskell really the language of geniuses and academia? ... by verandaguy on Saturday August 20, 2022 @01:53AM (#32529506)
That was the most memorable issue I had with Haskell; thinking back, other stuff that bugged me was some of the idioms needed to move between pure and impure code. You may be right though, it's something I should probably revisit. It's been a couple years and I did end up taking some of the lessons learned from Haskell into other languages (mostly not at a low level, though -- it's more that Haskell informed how to approach some higher-level design problems). Railway-oriented programming in particular stuck with me as a _great_ pattern that's consistently useful across languages.

I still think it's worth learning by anyone who's got the time for it.

Re:Is Haskell really the language of geniuses and academia? ... by whateveracct on Saturday August 20, 2022 @01:11AM (#32529286)
What?? I've gotten paid big money to write Haskell for like a decade. None of the work had anything to do with formal models. That's comically wrong. But it was good software and Haskell was a big part of that.
Re:Is Haskell really the language of geniuses and academia? ... by havercosine on Saturday August 20, 2022 @12:33AM (#32529103)
Thanks for writing about that experience, makes sense. My first to forays in the language ended the same way. I tried to do mainstream programming stuff in it but realised I wasn't making much progress in first few days and eventually moved on.
Re:Is Haskell really the language of geniuses and academia? ... by epgui on Saturday August 20, 2022 @12:51AM (#32529173)
It sounds like you folks didn't give the language enough of a chance and may have felt the friction of trying to write Haskell in the style of another language. It takes a while to learn how to go with the grain, in any language.

While I totally sympathize with this, I'm not sure it's a very good vantage point from which to judge a language.

Re:Is Haskell really the language of geniuses and academia? ... by pdimitar on Saturday August 20, 2022 @12:59AM (#32529215)
Which goes back to the root comment and the issue it raised:

Where are the practical Haskell tutorials. No preaching, no "you're holding it wrong", ONLY this: "you need to handle arbitrarily nested JSON? here's how".

Re:Is Haskell really the language of geniuses and academia? ... by gilmi on Saturday August 20, 2022 @01:09AM (#32529272)
- Learn Haskell by building a blog generator[0] (disclaimer: I wrote this)

- Simple Haskell Handbook[1]

- Haskell (Almost) Standard Libraries[2]

- [0]: https://lhbg-book.link

- [1]: https://marcosampellegrini.com/simple-haskell-book

- [2]: https://leanpub.com/haskell-stdlibs/

Re:Is Haskell really the language of geniuses and academia? ... by epgui on Saturday August 20, 2022 @01:10AM (#32529277)
This is a pretty good resource, and there are many others: https://www.amazon.ca/Haskell-Depth-Vitaly-Bragilevsky/dp/16...

Learning an entirely new language is hard and requires patience and perseverance!