Live data from Hacker News

Ask HN: Why would anyone choose Haskell to develop applications?

news.ycombinator.com

91–100 of 128 posts

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#91
I chose it due to the type system. Nearly every piece of data is optional. I need to compose these pieces of data to form a full set and apply that set of rules to a system. Haskell made a lot of things work out really well:

* embedded DSL for describing things with minimal syntax * types to enforce my invariants * immutable data + STM to protect my shared data structures * multithreaded/async code is easy to work with * deterministic outputs given inputs

but it was headaches in a lot of ways:

* exceptions - still not sure I’ve handled all exceptions gracefully * culture - most teammates are intimidated by Haskell (and types) * ecosystem is behind (Rust has exponential usb acceleration vs Haskell’s constant pace)

While I’m proud of the outcome I would have chosen differently now that I’ve seen the other side and have the project done. The inertia I was fighting required far too much energy

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#92
At my last job, we had a Python codebase that had grown large and unwieldy. We wanted a language with stronger compile-time guarantees and better concurrency support. After evaluating several options the team at the time settled on Haskell and it's still used on all our kiosks to perform tasks including interfacing with the credit card reader: https://www.youtube.com/watch?v=O-z8hDXIQSg

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#93

Earlier quoted context omitted.

I prefer Javascript/Go/Python because most of my code is actually doing something instead of just conforming to a Gang Of Four pattern designed to paper over the shortcomings of my tool. I too want my programmers to be thinking about and solving my business problems, not writing boilerplate.

Do you prefer your English communication from people with limited English language proficiency, because they have things to say without attention to grammar, precision, and logical structuring? Lack of understanding of nuance works about as well in programming languages as it does in English - it's very limited and causes issues, which often the low vocab user is simply not aware of. But the issues exist nonetheless.…

To borrow your language metaphor, I find it's more like dealing with people who are capable of communicating complex ideas with simple vocabulary, versus people who can only communicate complex ideas using extremely technical jargon.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#94

When I asked my current employer why they chose it, they simply responded that it attracts the "right" people. From a business perspective, any language is arbitrary. What matters is having clever people around to solve problems.

Eh. The "right" people can have perverse incentives. My former mentor worked at a startup called Takt that billed itself as Haskell-only. It attracted all the top minds - Runar Bjarnason, who wrote a famous Scala book, worked there - and everyone was very eager to write Haskell code for a living. The engineering team quickly went all-in on functional everything . Nix for package managers, a Haskell-to-JS transpiler f…

I agree. I like Haskell and I highly recommend learning it. But I would not choose it for production projects. I have learned the hard way to only use old, boring, well-known by the team technology when implementing software to solve real world business problems.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#95

When I asked my current employer why they chose it, they simply responded that it attracts the "right" people. From a business perspective, any language is arbitrary. What matters is having clever people around to solve problems.

Eh. The "right" people can have perverse incentives. My former mentor worked at a startup called Takt that billed itself as Haskell-only. It attracted all the top minds - Runar Bjarnason, who wrote a famous Scala book, worked there - and everyone was very eager to write Haskell code for a living. The engineering team quickly went all-in on functional everything . Nix for package managers, a Haskell-to-JS transpiler f…

I don't think this is a programming language fail as much as it is seeing everything as nail because you chose to use only hammers. In the world of programming and technology I wished more people would look at people who invest and see that diversifying is what you need to do sometimes. Pick the immutable database but have a solid regular one along side of it in case you need to jump ship (more cost but it covers the case that the immutable database doesn't work out). This is the difference between investment and gambling. I would say to some degree they betted on immutable being the thing that would give them success instead of investing in immutable technologies that could be useful.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#96
post #15

Earlier quoted context omitted.

Maybe the same applies to building a RESTful API and choosing Go instead of js :)

You will get slightly better people but still the wrong people. JS is almost never the right tool for the job, Go is occasionally the right tool for the job, mainly if you need to write something that moves bytes from one fd to another without much in the way of business logic. TBH if you are building something boring you should just use Spring w/Java or Kotlin. This will attract pragmatists that ship code that works…

> JS is almost never the right tool for the job

JS is one of the most successful programming languages in history. Millions of JS programmers solve real world problems every single day. It might not be the right tool for you of course but that has nothing to do with JS itself.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#97

You’re in luck. I prepared an entire thread on this subject, as someone who was forced to learn it by necessity rather than by choice. https://twitter.com/theshawwn/status/1490237220950876161?s=2... I’ll come out and say it though: Haskell is a cult. It’s best to smile and nod when you’re around the believers. They’re harmless. Ditto for rust. It is truly astonishing how much code a determined team of haskellers can…

> monads are the Aristotle philosophy equivalent of programming. Take care not to study them too closely.

Monads is just a pattern for composing functions that can’t be composed using “normal” function composition (because of incompatible types). That’s all it is. I never understood the fetishisation/worship of monads in the Haskell community.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#98
Learning Haskell was a joy and it made me a better software developer. However I don’t reach for it when developing production software. The advantages doesn’t outweigh the disadvantages (compared with using more mainstream languages). I also highly recommend learning Agda/Idris/Coq/Lean/F*. They are to Haskell what Haskell is to mainstream languages. Learning them will make you a much better developer. Even if you never use them for production code.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#99

When I asked my current employer why they chose it, they simply responded that it attracts the "right" people. From a business perspective, any language is arbitrary. What matters is having clever people around to solve problems.

Eh. The "right" people can have perverse incentives. My former mentor worked at a startup called Takt that billed itself as Haskell-only. It attracted all the top minds - Runar Bjarnason, who wrote a famous Scala book, worked there - and everyone was very eager to write Haskell code for a living. The engineering team quickly went all-in on functional everything . Nix for package managers, a Haskell-to-JS transpiler f…

Similar experience, but Scala with pure FP (Cats) rather than Haskell.

We have

- "beautiful" code by zealots (who left) that has terrible performance. I've done two refactorings that bring > 100x performance increase.

- code by latecomers that misses the points of FP semantics and is subtly wrong.

- horrible compilation speed, therefore time-to-test, from heavy use of advanced features that add little value. The long feedback loop hurts not only productivity, also morale.

Re: Ask HN: Why would anyone choose Haskell to develop applications?

#100

Earlier quoted context omitted.

Eh. The "right" people can have perverse incentives. My former mentor worked at a startup called Takt that billed itself as Haskell-only. It attracted all the top minds - Runar Bjarnason, who wrote a famous Scala book, worked there - and everyone was very eager to write Haskell code for a living. The engineering team quickly went all-in on functional everything . Nix for package managers, a Haskell-to-JS transpiler f…

I agree. I like Haskell and I highly recommend learning it. But I would not choose it for production projects. I have learned the hard way to only use old, boring, well-known by the team technology when implementing software to solve real world business problems.

Haskell is quite old and boring though.
Post reply on HN