←back to thread

193 points ingve | 1 comments | | HN request time: 0s | source
Show context
mikojan ◴[] No.43712753[source]
In another life I will be a Haskell programmer
replies(6): >>43712991 #>>43713006 #>>43713074 #>>43714014 #>>43714156 #>>43716535 #
cosmic_quanta ◴[] No.43716535[source]
There's no time like the present. Feel free to reach out if I can help you along your journey
replies(1): >>43720364 #
tasuki ◴[] No.43720364[source]
Not the person you're replying to, but I'll bite:

I've written low thousands of lines of Haskell. Similar to mikojan, I love Haskell in theory, but ended up not enjoying it as much in practice.

1. The multitude of string-y types. I end up converting between String, Text, Lazy Text, ByteString, Lazy ByteString, and I forget what else. Each library wants me to pass in a specific string type, and each other library returns a different string type. LLMs are good at this, also for a while I had a ton of helper functions to convert between any two string types. Still, perhaps there's a better way?

2. The error messages. I come from Elm, so I'm spoiled. Yes, I understand a language with HKTs will never have as nice error messages. Yes, LLMs are pretty good at explaining GHC error messages.

3. The stdlib. Haskell gets a lot of credit for safety, but a `head` blows up instead of returning a `Maybe`. I know there are other - safer - preludes, but I don't know how to choose between them. I don't know how using a different prelude would impact my projects.

I feel like my next step is either towards Idris, with its polished standard library (and dependent types baked into the language!), or towards something simpler and more Elm-like (Gleam perhaps, or Roc). But if you can sell me on Haskell, I'm all ears!

replies(3): >>43721245 #>>43724195 #>>43734571 #
1. butterisgood ◴[] No.43724195[source]
Hence GHC extensions? Overloaded Strings don’t help? It’s been about 20 years since I wrote Haskell in production.