- “The ‘monad’ abstraction is excellent for dealing with code with a lot of failure conditions (ie. parsing) and avoids ‘pyramid of doom’ type code. Haskell worked out really well in this key area.”
- “Another strong positive for writing Deadpendency was testing. Haskell has a lesser-known style of testing libraries that do ‘property based testing’ (PBT).”
- “Haskell is very safe to refactor thanks to the type safety the compiler brings, which is probably the most important thing.”
- “My core Haskell had very few logic bugs. This is because Haskell is very safe by default and I had opted into strict types that help catch edge cases”
- “At this point I think it is actually pretty stable. I consider the project a big success. A huge part of this has been due to Haskell and its excellent ecosystem.”
I loved learning Haskell in university. It's an interesting language. I came into intro CS class thinking I could already program & the class would just be about sharpening my axe. Then my intro CS class started with Haskell which threw my brain for a loop and made me think about programming completely differently. That was a great intellectual experience and good for my long term thinking.
Haskell also seems like an incredibly impractical choice for a production language that only a stubborn purist would make. Of course the last bit is purely opinion, your experience may vary.
Getting a web application started in Ruby is easy because it does so much for you out of the box.
There are frameworks that make similar choices for you in Haskell as well: IHP, Yesod, etc.
I think taking two weeks to "set up" a Haskell project is a bit long but I read it as the author taking two weeks to learn enough Haskell to make two rather advanced libraries work together... which means they had to make all the little micro decisions that frameworks make for you, etc. With more experience that could've been done in less time.
If they had started with IHP I think it would've been your usual day or two.
It's enough to make Haskell really seem like a reasonable choice to "jump in with" without fear of never reaching some mundane goal.
And if I was new to Java, I wouldn't know which frameworks I wanted...
npx create-react-app foo-app
cd foo-app
yarn start
In ~2 minutes (10 if you had to install node/npm/npx), you have a hot-reloading live site to play with.That doesn’t make React great nor solve all of the issues that lie between minute 1 and v0.1 in production, but the startup is smooth and painless (for me who comes from C/C++/C#/SQL, and my javascript is at a level where beginners can still help me).
curl -L https://nixos.org/nix/install | sh
cat > ./script.sh <<EOF
#! /usr/bin/env nix-shell
#! nix-shell <nixpkgs> -i runghc -p "ghc.withPackages (x: [ x.yesod ])"
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
import Yesod
data App = App
mkYesod "App" [parseRoutes|
/ HomeR GET
|]
instance Yesod App
getHomeR = return $ object ["msg" .= "Hello!"]
port = 3000
main = warp port App
EOF
chmod +x ./script.sh
./script.shAnd several others listed here: https://wiki.haskell.org/Haskell_in_education
And in fact very detailed criticism can be a good indication that the person is not some beginner frustrated with "that bad feature" but a developer who cares a lot about the technology but is also realistic about the things that aren't as good as they could be.
Not the author, but my reading of his motivations was that the "challenging to learn, but extremely fun to write" part is way more important to them than the "best general purpose language". If your main motivation is to make as much money is as little time as possible then JS or Rails might get you off the ground sooner (although Haskell might catch up in the long run when the type system really starts paying off).
If you enjoy programming in Haskell and are looking to have a good time while building your startup, more power to you for using the language you like.
But that speed flips once you have a larger system and need to maintain it.
Hey you just threw that in yourself. That's cheating! I think it's actually easy to get Haskell devs. I'm capable and I apply to every Haskell job. I never get hired so I imagine companies have no trouble finding other even more capable Haskell devs.
Compare and contrast how happy are users of Java the language vs JVM the ecosystem (Clojure, Scala, Kotlin, etc).
I'm happy when I'm productive and ship stuff. I'm unhappy when I have to struggle with obscure/undocumented libraries/tools.
Yes.
We let some features and monads go and picked F# instead of Haskell.
>> It is an accomplishment if you get your basic project setupped in 2 weeks
More like two hours if you absolutely cluless.
- It is very hard to make popular libraries work together
Not an issue.
- 1/3 of the popular libraries are not well maintained, there are no docs and maintainers do not reply to PRs
Not an issue.
- It is hard to use latest GHC versions because of the previous problem
Not an issue.
- It is hard to get additional devs
Same. Few F# devs out there.
- Compile times are ok-ayish but can be a pain
Not an issue.
- There is no good IDE and refactoring
Not an issue (VS, VS Code, and a few dozen others)
I know it is not as strict as Haskell but we have really a good time so far.
The third point is the same with just about every ecosystem in my experience, there are libraries written by big open source contributing companies which are completely dead as far as maintenance. I've even been bitten _this week_ by a JS library which is dead in the water.
- It is an accomplishment if you get your basic project setupped in 2 weeks
- It is very hard to make popular libraries work together
- 1/3 of the popular libraries are not well maintained, there are no docs and maintainers do not reply to PRs
- It is hard to use latest GHC versions because of the previous problem
- It is hard to get additional devs
- Compile times are ok-ayish but can be a pain
- There is no good IDE and refactoring
But it is still somehow "the best general purpose language"?
And don't get me wrong, Haskell is on top of my list of purely functional languages that I would like to learn.
BUT, if I want to build an actual app and try to earn money from it I would just use something that is very popular, well maintained, easy to push features, easy to deploy and find additional devs for. For me it is ReactJS on the frontend and Kotlin on the backend. OR it is a jackpot if I could just make it in something like NextJS. Haskell can wait for when I earn enough money with other languages so that I can just play with it and satisfy my own engineering itch without any production expectations I have from other languages.