Live data from Hacker News

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

news.ycombinator.com

11–20 of 128 posts

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

#11

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.

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

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

#12
post #9
post #6

Earlier quoted context omitted.

This also provides maintenance benefits. It's not _quite_ that if it compiles (after you make whatever change you wanted to) that it's correct, but it's not far off either.

> but it's not far off either. How "far "off" is it, in terms of correctness, compared to other, more conventional statically typed languages like C++ or Java or Rust?

Sadly, there is not an obvious metric through which this can be answered, but the type system is much more advanced than that of C++ or Java, and as such you can be more precise about the inputs and outputs of a piece of code.

As long as take advantage of the type system, the compiler tends to permit far fewer programs that compile, but do the wrong thing, than is the case in C++/Java. You will notice you spend more time editing code to make it compile, and less time debugging code that does compile.

Rust should not be grouped with C++ or Java, as its type system is essentially that of Haskell with the addition of lifetimes. The developer experience is similar in that you tend to spend more time getting code to compile, and less time debugging.

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

#13

Because some people know it, like it, and because they can . It’s like asking why Facebook still uses PHP. But also, every language has something it’s particularly skilled at. There are still business applications out there in COBOL because there are some features hard to replicate in modern ones. No language ever dies.

PHP is amazing! Facebook uses Hack on HHVM.

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

#14
Something Haskell programmers commonly experience is that their programs typically work the first time they compile, due to the type system. I was skeptical of this but I've experienced it myself too -- it's kind of fun! What this means is that you spent most of your time thinking about how to express your code elegantly in the type system, but once you do it usually just works. That's a huge practical benefit you don't see in other languages without such an expressive type system.

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

#15

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.

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 in ways that anyone else that works with these tools will instantly understand also. In a way it attracts mediocrity but in the good way where you get nice standard code that can be maintained cheaply for a long time and it's easy to hire for the skillset.

If you are prototyping extremely quickly then maybe Ruby on Rails might be the right tool for the job (and thus attract the right kind of people).

Go attracts mediocrity and not in a good way, it also actively repels the "right " people if you want to hire for highest intellectual horsepower for a given budget.

In the same category as Haskell you also have OCaml, the Lisps (Clojure in particular) and Erlang all of which will yield you lots of the "right" people. None of these people will be cheap but none of the good people that write the other languages are cheap either, however there is a strong correlation between interest and proficiency in these languages and high intellectual horsepower - hence "right" in this context.

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

#16
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…

This can cut both ways.

Yes, if you choose Haskell, a Lisp, or something like Erlang, you can get smarter/better devs. But the flip side of that is that the types of people who tend to gravitate toward those languages are often more interested in programming for it's own sake and not the domain they're working in. So you get things like people burning hours writing their own libraries and endless tinkering with programming minutiae instead of getting sh* done.

On the other hand, a mediocre programmer who taught themselves Python, may not be winning any programming competitions, but will often have significant domain expertise and a bias toward getting things done.

You need to ask yourself whether or not the stuff you're working on really demands the absolute best programmers (it very rarely does). If it does, go with the Erlang/Haskell/Lisp crew, otherwise go with the Python/JS/Go crew.

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

#17

Because some people know it, like it, and because they can . It’s like asking why Facebook still uses PHP. But also, every language has something it’s particularly skilled at. There are still business applications out there in COBOL because there are some features hard to replicate in modern ones. No language ever dies.

I suspect PHP's popularity has really only waned in the US. Just my very anecdotal observations.

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

#18
post #16
post #15

Earlier quoted context omitted.

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…

This can cut both ways. Yes, if you choose Haskell, a Lisp, or something like Erlang, you can get smarter/better devs. But the flip side of that is that the types of people who tend to gravitate toward those languages are often more interested in programming for it's own sake and not the domain they're working in. So you get things like people burning hours writing their own libraries and endless tinkering with progr…

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 weeks, no random runtime bugs and shitty native extensions that cause said runtime bugs or memory leaks outside of runtime level heap accounting, etc.

Boring tech is the way to go for 99% of problems and to me JS/Go/Python don't qualify because they break too much and require too many workarounds for too many problems. I want my programmers to be thinking about how to solve my business problem, not problems with their tools.

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

#19
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…

> If you are prototyping extremely quickly then maybe Ruby on Rails might be the right tool for the job (and thus attract the right kind of people).

I am puzzled by this because my early experience of Ruby On Rails (and I mean early -- 2005) is that every Rails developer I encountered knew much less than they were letting on.

> Go attracts mediocrity and not in a good way, it also actively repels the "right " people if you want to hire for highest intellectual horsepower for a given budget.

I really think this needs backing up with at the very least a juicy horror story! I'm not convinced by this at all.

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

#20
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"

Except, you know, in the browser...

Post reply on HN