Live data from Hacker News

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

news.ycombinator.com

61–70 of 128 posts

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

#61
post #39

Earlier quoted context omitted.

For context I worked with Go extensively for about 5 years. I tried very hard to like it because I have immense respect for folks on the core team. I even wrote some pretty good code in it. However a few things became very clear to me over time. 1. Go is -not- a general purpose language. It lacks expressiveness necessary for this purpose which leads to overly hard to follow and refactor business logic, repetitive and…

> Also I could just be jaded old and grumpy but whatever, this is how I feel about it and everyone is free to be wrong on the Internet. No -- this is interesting. I also think point 3 and 5 probably informed and explain the new generics design, which seems intended to reward perseverance. I didn't find channels difficult, but then I have some Occam, CSP and PVM experience, and some message-passing parallel language d…

I do think you are right there and that generics will have a significant (and likley highly positive) impact on Go.

Much of the code I wrote in large applications amounted to writing application specific data-structures that had no business being application specific. However due to Go restricting generic capability to language level features and reflection being far too slow it lead to a lot of it sadly. One of the reasons I love the JVM ecosystem so much is access to the `java.collections` library which is definitely 1st class among standard libraries.

I haven't kept up with Go development but I hope they are going to revamp the stdlib with generics powered structures etc. Seeing people use the stdlib linkedlist implementation always caused me to start questioning my life decisions.

As for channels I think basic usage is straight forward. Where things become complicated is differences between buffered vs unbuffered channels and how combining those in select statements etc makes for some interesting interactions. Which is what I find egregious, something that looks and feels simple until it's not.

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

#62
post #44

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.

This is generally true. > From a business perspective, any language is arbitrary. Counterpoint: And then when the company starts growing quickly and has to hire 10 Haskell devs in 12 months, they realize its pretty much impossible to do without shelling out $200k/person.

When they do that they don’t hire devs already experienced in Haskell, they just hire smart experienced devs who are competent at building systems and can learn to build them in Haskell.

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

#63
post #60
post #26

Earlier quoted context omitted.

No, it just means the people that tend to be attracted to these types of languages. Easy to get started languages that hide much of the inner workings from you as a dev.

Haskell hides far more of the inner workings than Python, JS or Go. There's a huge gap between the semantics of a non-strict, pure functional language and the actual execution model.

(Username checks out)

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

#64
post #53

Earlier quoted context omitted.

...which is likely saving money long run anyway - good developers usually pay for themselves, if not, they're in the wrong place.

In this case it doesn't mean the 200k dev is necessarily good. It just means the supply has dried up driving up the prices.

It's hard to believe that 10 devs in 1 year would dry up all haskell market.

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

#65
SimulaVR uses Haskell for its VR compositor: https://github.com/SimulaVR/Simula

There were some practical reasons for this, but at the end of the day: if you're going to spend thousands of hours developing something, you might as well choose a language that you find beautiful and enjoy working in.

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

#66

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.

Jane Street has the same rationale.

I think it was more or less the best tool for the job (according to them) back when their tech lead chose it and now they've built all their tech stack around it. I remember a blog post or interview where he said they wouldn't necessarily use OCaml if starting again right now. I don't think he was referring to going the way of Haskell either.

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

#67
post #55
post #45

Earlier quoted context omitted.

> I much prefer the JVM and ASP.NET crew because they are 9-5 programmers, I don't think thats what the parent meant. They meant esoteric functional programming languages vs mainstream OOP ones. You're saying the same thing.

I was clarifying I consider them to be separate categories. Java/.NET cultures are distinctly different to Go/JS/Python despite both categories being mainstream. The former is old, boring and sticks to what works. They are both slow moving, have large established frameworks for each applicable domain, prioritize backwards compatibility, have highly evolved IDEs that support both the language but also the dominant fra…

Python came out in like the early 90s I think when the Berlin wall hadn't been knocked down for all that long. It is OLD and battle tested by many many high profile companies. Granted, sometimes it isn't the right tool and the JVM is. Same is true in reverse as Java has significantly more boiler plate than Python. I do agree Python has changed more over time.

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

#68
post #18

Earlier quoted context omitted.

This is where I differ. I think the Python/JS/Go crew gets you stuff that is built poorly and becomes expensive to maintain. I much prefer the JVM and ASP.NET crew because they are 9-5 programmers, their tools aren't constantly changing so for the most part they only need to spend time actually doing work. No fighting with package managers, no updating the latest framework and solving backwards incompatibilities for…

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.

I think you hit the nail on the head. As someone who started the bulk of my programming in Python, I found learning Java to be an excercise in frustration as there is so much you have to learn about design patterns and all of that mess. It seems to come up 500x more than in Python which is like here are a bunch of high level data structures and objects and how to use them, so go have fun.

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

#69
A lot of this discussion has devolved into the management side of choosing a language and strayed from the realistic side. But insofar as to why people would choose Haskell...

Haskell is fast, compiled, type safe, memory optimized, allows concurrency and parallelism. The use cases where you'll see using Haskell will generally be companies like financial sector where very fast and error free execution directly translates to making more money, e.g. dark pool front running trading algorithms. Generally you don't hear it extolled because of who is using it and the secrecy around what it's being used for, e.g. competitive advantage.

Outside of that you'll probably only see it in academia because of a lot of the reasons listed in the replies. In my opinion its a harder language to learn because it really is just lambda calculus translated to a programming language.

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

#70
post #47

Earlier quoted context omitted.

And yet there are hardly any software written in Haskell or Ocaml that are widely used or have any notable positive impact on the modern digital world, compared to those written in languages like Go, C++ or Python. edit: ps: Big fan of OCaml, but have since moved on to Go and Python for getting things done in the real world.

OCaml is mostly used in speciality applications. I have a few friends that work on flight control software for satellites and their stuff is all OCaml which is apparently not that uncommon in their field. That said none of them knew OCaml before joining said company and thus none were hired because of it... so that does somewhat invalidate the "right" people argument but I guess if you are doing literal rocket scienc…

FWIW, SpaceX uses C++ for flight control software. It actually makes more sense for such hard realtime applications.
Post reply on HN