Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s highly scalable. Part of the reason compile times are a bit long is that the compiler is doing whole program analysis.

Most of the control flow in a Haskell program is encoded in the types. A “sum type” is a type that represents choices and they introduce new branches to your logic. The compiler can be configured to squawk at you if you miss any branches in your code (as long as you’re disciplined to be wary about catch-all pattern matches). This means that even at millions of lines you can get away with refactorings that change thousands of lines across many modules and be confident you haven’t missed anything.

You can do these things in C++ code based as well but I find the analysis tooling there is building models where in Haskell the types are much more direct. You get feedback faster.



Modern C++ has something like sum types, but it's so clunky and un-ergonomic it's ridiculous :(


And the standard library is including monad-like types too. It has come a long way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: