3 ms·
> Haskell really is a "secret weapon" and people who use it for production tend to love it That's exactly my question. I'd be really interested in hearing abou
by nextos 6y ago
> Haskell really is a "secret weapon" and people who use it for production tend to love it
That's exactly my question. I'd be really interested in hearing about domains where Haskell is a secret weapon and how it compares to ML family languages and dependently-typed ones.
- the_af 6y agoI'll let people who actually use it -- instead of toy with it, like myself -- answer you. I know many haskellers read HN and have answered similar questions in the past. Like I said, I do know Haskell is used at fintechs (source: a friend whose job is precisely that).
- ghostwriter 6y agohttps://news.ycombinator.com/item?id=23367803 https://news.ycombinator.com/item?id=23367803
- implicit 6y agoI did a bunch of professional Haskell work in a prior life[1]. Most of its 'secret weapon' status springs from the way Haskell lets you control side effects. We had a fantastic unit testing harness[2]. With effect tracking, you can arrange for your harness to put precise fences around nondeterministic code. You don't need to rely on experience and discipline to ensure that tests are reliable or fast. The type system does it for you. Effect tracking also makes concurrent code easier to write. You have a great deal of control over how and when threads can be created, and what kinds of logic is permitted on those threads. GHC's IO manager offers green threads and async IO, so rather than a select loop, you just fork threads and perform "blocking" IO calls. You get about the same efficiency as a select loop this way. Lastly, something we learned to appreciate over the years is that Haskell is easier to refactor. When you combine the rigid type system, effect tracking system, and ease of writing unit tests, it becomes very easy to refactor old Haskell. It doesn't really matter how bad the old code was or whether the original author is around to help you at all. If you intend for your product to evolve continuously forever, this is truly a secret weapon. [1] https://andyfriesen.com/2014/03/25/what-its-like-to-use-haskell.html [2] https://andyfriesen.com/2015/06/17/testable-io-in-haskell.html
- 6gvONxR4sf7o 6y agoOf all the things I like in haskell (having only used it a as a hobbyist), refactoring tops the list. It's a lot less scary to refactor when the compiler tells you so much about which parts you missed.