Live data from Hacker News

Why isn't Haskell popular in industry?

palgorithm.co.uk

21–30 of 145 posts

Re: Why isn't Haskell popular in industry?

#21
I think there are a couple reason.

Haskell is a significant departure from most other languages commonly used by industrial programmers. It's a relatively shallow learning curve from Java to Python to JavaScript, but making the leap to a pure functional language is very difficult. Path-dependence plays a huge part here. This isn't just a matter of "people being afraid of what's different" as the article suggests; there are very rational reasons for a profit-seeking firm to exploit the fact that their developers (and those available to hire) are already relatively proficient at writing procedural code.

Another, more important reason, is that Haskell is too intellectually demanding for most industrial programmers. I consider myself an enthusiast of functional programming, but achieving anything practical using purely functional code remains extremely difficult for me, even though I regularly dabble in it during my free time. The Haskell IRC channel can be helpful, but it's very difficult to square "Haskell is easy enough for anyone to learn" with the inevitable "you are too stupid/impatient/incompetent to use Haskell effectively" taunts you're likely to hear, when you're asking for help to perform a simple task. Many Haskell evangelists don't understand that most developers aren't nearly as smart or dedicated as they are.

I'd be curious to know where most Haskell users believe they lie on the distribution of programming ability. I'd estimate most of them lie at the 99% percentile, and that any of them arguing otherwise are doing so out of modesty. (Note that I'd include dedication and curiosity in with intelligence in this metric.) I believe the most likely explanation for this is that Haskell is a particularly difficult language to use effectively.

Re: Why isn't Haskell popular in industry?

#22
post #8

Every language has a catalyst that pushes it from obscurity into mainstream use. Whether it be a project (Ruby on Rails), a programmer (Linus Torvalds -> C), a company (Google -> Python), or a library (Boost -> C++), there is always a force behind adoption. Most languages undergo a "fad period", where it's hip and cool to write in it and people just do it because other people do it. Clojure is going through this righ…

This reddit post tells me why Haskell isn't that popular. http://www.reddit.com/r/haskell/comments/cs54i/how_would_you... Writing a quick directory traversal function should be a no-brainer in any reasonably general-purpose language. The fact that the above reddit thread is jam-packed with the ins-and-outs of doing this simple task in Haskell tells me that Haskell may be great for some things, but it's probably not g…

What most other languages do, though, is exactly equivalent to Haskell's unsafePerformIO. If you want to interact with your environment in possibly-destructive ways (and sending a message out of the runtime, whether to the network or the OS, always has the possibility of being destructive, because you can never guarantee what a system not under your control will do in response to your message), just accept the reminder that it's not functional/idempotent/memoizable/whatever else, and do it.

This is going to sound like an odd analogy, but saying "I won't use Haskell because I want to do IO, but don't want to unsafely do IO", makes you sound like a person playing a fighting game who blames their loss on the game not being "fair." If you're playing to win[1], and there's an "unfair" tactic, you use it yourself. If "cheating" at Haskell lets you do a higher-quality job, faster, than either using a different language or "playing Haskell as it was meant to be played" (i.e. being a scrub) then why not?

[1] http://www.sirlin.net/ptw

Re: Why isn't Haskell popular in industry?

#23

Earlier quoted context omitted.

Why doesn't Haskell support objects? Seems like that would be quite useful. They don't need to be mutable or anything. They could be like records, that scale.

Because it has typeclasses, which solve the same problems without creating the new problems that conventional objects do. Why doesn't Java support pattern matching?

Or have closures yet.

Re: Why isn't Haskell popular in industry?

#25
post #24

I outlined some of the problems a while ago: http://www.codexon.com/posts/why-arent-functional-languages-... Short version: Haskell is harder than C while being slower and uses more memory. The main implementation GHC, comes with GPL concerns.

GPL concerns? Its BSD licensed. Haskell's library system is perhaps uniquely BSD-friendly, with over 75% of libraries BSD licensed.

And as pointed out at the time, commercial users already funded the -dynamic flag, along with the ability to swap out libgmp.

So that's FUD. As was pointed out in this forum at the time: http://news.ycombinator.com/item?id=847120

Re: Why isn't Haskell popular in industry?

#26
post #8

Every language has a catalyst that pushes it from obscurity into mainstream use. Whether it be a project (Ruby on Rails), a programmer (Linus Torvalds -> C), a company (Google -> Python), or a library (Boost -> C++), there is always a force behind adoption. Most languages undergo a "fad period", where it's hip and cool to write in it and people just do it because other people do it. Clojure is going through this righ…

This reddit post tells me why Haskell isn't that popular. http://www.reddit.com/r/haskell/comments/cs54i/how_would_you... Writing a quick directory traversal function should be a no-brainer in any reasonably general-purpose language. The fact that the above reddit thread is jam-packed with the ins-and-outs of doing this simple task in Haskell tells me that Haskell may be great for some things, but it's probably not g…

I started using Haskell five years ago (before the age of dons), and wrote a very intensive (parser generator)^^3 project in it in 2007 that was inspired by some half-finished postdoc papers I found from researchers at Utrecht University — but I haven't really used it in the last several years.

When people in that reddit thread started debating zygohistomorphic prepromorphisms, even I assumed it it was reddittard parody. Apparently not!

Re: Why isn't Haskell popular in industry?

#27
post #25
post #24

I outlined some of the problems a while ago: http://www.codexon.com/posts/why-arent-functional-languages-... Short version: Haskell is harder than C while being slower and uses more memory. The main implementation GHC, comes with GPL concerns.

GPL concerns? Its BSD licensed. Haskell's library system is perhaps uniquely BSD-friendly, with over 75% of libraries BSD licensed. And as pointed out at the time, commercial users already funded the -dynamic flag, along with the ability to swap out libgmp. So that's FUD. As was pointed out in this forum at the time: http://news.ycombinator.com/item?id=847120

The default behavior was to statically link to libgmp. I don't know about you, but making people's programs GPL by default doesn't exactly inspire confidence in the industry.

Re: Why isn't Haskell popular in industry?

#28
Because it doesn't run on the JVM.

For a variety of reasons — including critical third-party libraries — anything that doesn't run on the JVM and interoperate with legacy Java code is just a non starter for my company. I suspect many other organizations are in a similar situation. It looks like someone is working on a JVM port now so hopefully we'll see something usable in a few years.

Re: Why isn't Haskell popular in industry?

#29
post #27
post #25

Earlier quoted context omitted.

GPL concerns? Its BSD licensed. Haskell's library system is perhaps uniquely BSD-friendly, with over 75% of libraries BSD licensed. And as pointed out at the time, commercial users already funded the -dynamic flag, along with the ability to swap out libgmp. So that's FUD. As was pointed out in this forum at the time: http://news.ycombinator.com/item?id=847120

The default behavior was to statically link to libgmp. I don't know about you, but making people's programs GPL by default doesn't exactly inspire confidence in the industry.

Whether or not libgmp was ever statically linked by default depended on your distribution. Were you shipping apps on Windows prior to the -dynamic flag's introduction? If so, then you were watching what libraries you were using, and following these instructions: http://haskell.forkio.com/gmpwindows

These days you can just run "cabal license-check" (IIRC) which will type check all the libraries you use for compliance.

Have a nice day.

Re: Why isn't Haskell popular in industry?

#30
post #20

Haskell's a statically compiled language. Wouldn't the "embeddable Haskell" the author proposes essentially be a library?

Only to the extent that Firefox is a JavaScript library. I think the major idea is that there is some application whose operation is very broadly directed by the embedded language, in a sandbox-like environment designed for the embedded language. For instance, you could write a video game whose graphics and collision detection and whatnot are all C++, but have Haskell bindings so that all the high-level game code would be Haskell. This isn't all that different from the usage of the much more C-like UnrealScript, which is used for exactly this purpose and is both statically typed and compiled, if I recall correctly.
Post reply on HN