Live data from Hacker News

Why isn't Haskell popular in industry?

palgorithm.co.uk

81–90 of 145 posts

Re: Why isn't Haskell popular in industry?

#81
post #31

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; the…

Another, more important reason, is that Haskell is too intellectually demanding for most industrial programmers. t While that's often stated as a reason, I don't believe it myself, simply on the grounds that anyone smart enough to use C++ "in anger" is smart enough to learn any language. The reason that Haskell isn't popular (IMHO) is that a lot of programming isn't clever algorithms, it's forms (interfaces for getti…

I think "knowing C++" just involves rote-learning of lots of stupid rules. Whereas Haskell is really quite different.

Don't forget that F# was "inspired" by OCaml ...

Re: Why isn't Haskell popular in industry?

#82
post #6

Earlier quoted context omitted.

You're not. I want to add that he was just the first guy that popped into my head when I thought C. I questioned it at first too, but the more I thought about it, Linux itself could have just as well have been written in Pascal or Lisp. If it had been, perhaps a lot of the tools, drivers, etc that interact with Linux would've been written in that language as well? Perhaps a better example is needed.

C was never obscure in the way that Haskell is now and C++ once was. It was popularized by the project for which it was invented: UNIX, of which Linux is a two-decades-late clone. C's prevalence has always been closely tied to that of UNIX.

Not sure about that - I seem to remember reading some stuff from the mid/late seventies that was pretty skeptical about the whole idea of using a comparatively high level language for OS development.

Similarly, I don't think C++ was ever obscure in that it was widely publicized as the "next" C and people were pretty keen to use it - it was more that the early tools for C++ failed to live up to the initial promise.

Re: Why isn't Haskell popular in industry?

#83
post #70

Earlier quoted context omitted.

I appreciate that. I am actually familiar with Haskell and the Maybe monad. Are there use cases for Maybe where you're not interacting with some sort of IO?

Oh yeah sure all the time, Maybe shows up a lot. It becomes more useful and less of a pain once you realise you can deal with it using monad operators. From the standard library a list operator and a map operator: elemIndex :: a -> [a] -> Maybe Int lookup :: k -> Map k a -> Maybe a Say we have a map of lists of string, for some reason. We need to find the index of the element "foobar" in a particular key, so you coul…

Ah duh. That makes sense.

Would it also make sense to use Maybe monad for converting a [Char] to an Integer?

stringToInt :: [Char] -> Maybe Integer

Re: Why isn't Haskell popular in industry?

#84
As someone who has been learning Haskell recently I think I can bring up a point that no one else has. Record syntax in Haskell sucks. Most business programming revolves around a form of DDD, where each of your business entities are fairly well defined. Creating records that match these business entities is fairly simple, working with them is not. None of the web frameworks I've seen follow a model based approach where you bind directly to your form representation of a model. I've been trying to figure out a way to do this in Haskell, but it looks like I have to learn Template Haskell and Generics on top of the already steep learning curve of Haskell, for something that would be simple in almost any other language. So far I haven't given up, but I don't see mainstream programmers getting into Haskell until they can describe their processes in a model focused fashion (and no, I don't mean with OOP).

Re: Why isn't Haskell popular in industry?

#85
post #76
post #47

Haskell is not popular because to be popular you must cater to the average Joe. And to cater to average Joe your foremost goal must be not making him uncomfortable about himself. Never forget this. And since most average Joes just work to pay their bills, they don't give a damn about technical superiority, you know.

I'll have to correct you a bit. Judging by the article, Haskell currently isn't usable for work. So why should average Joe choose half-finished product? So why even the brightest hacker choose it when he already has all the tools he need?

You made a point. I've been rumbling on this lately, and I'm sharing my current conclusion here to hear HNers' opinions.

Let's consider Common Lisp. Newcomers and outsiders complain that CL doesn't catch up because there aren't free CL environments around with a thoughtless setup (I've been in this camp too). However, if you read comp.lang.lisp, it jumps into your eyes that many lispers are accomplished and sharp programmers. Still, they haven't fixed such "issues" once and for all. So, what's the real deal? I think that here lies an explanation: such issues are not such an issue to experienced programmers. That is, if you can't setup a CL system, you simply are not skilled enough as a programmer. Get over it. I think the same applies to other systems like Haskell, GNU/Linux, Emacs and so on.

What do you think? Thanks.

EDIT: Of course, there are other causes to consider... for instance, since most CL developers work on *nix, there is less work done on Windows. I think that installing a CL environment kind of fires the Law of Leaky Abstractions: you'll have to deal with some nitty-gritty details...

Re: Why isn't Haskell popular in industry?

#86
post #47

Haskell is not popular because to be popular you must cater to the average Joe. And to cater to average Joe your foremost goal must be not making him uncomfortable about himself. Never forget this. And since most average Joes just work to pay their bills, they don't give a damn about technical superiority, you know.

Speaking as a very experienced average Joe, all I need to see is a use case that shows how learning all of the weirdness discussed in the other comments in this thread will help me do my job.

I can't remember the last time I had trouble getting something done in C because it didn't support Kleisli arrows, or whatever.

Re: Why isn't Haskell popular in industry?

#87
post #83

Earlier quoted context omitted.

Oh yeah sure all the time, Maybe shows up a lot. It becomes more useful and less of a pain once you realise you can deal with it using monad operators. From the standard library a list operator and a map operator: elemIndex :: a -> [a] -> Maybe Int lookup :: k -> Map k a -> Maybe a Say we have a map of lists of string, for some reason. We need to find the index of the element "foobar" in a particular key, so you coul…

Ah duh. That makes sense. Would it also make sense to use Maybe monad for converting a [Char] to an Integer? stringToInt :: [Char] -> Maybe Integer

Yeah it would. I think there was a Real World Haskell exercise that involved that actually.

Re: Why isn't Haskell popular in industry?

#88
post #66
post #47

Haskell is not popular because to be popular you must cater to the average Joe. And to cater to average Joe your foremost goal must be not making him uncomfortable about himself. Never forget this. And since most average Joes just work to pay their bills, they don't give a damn about technical superiority, you know.

Yeah but still being hacker is to make oneself uncomfortable when not being skilled enough, then to overcome this by practicing the skill. So maybe we should say that it depends if someone is a hacker or a coding monkey. I've seen rates of about 20%-80% in the industry.

That is implied in what I've said: hackers are a minority.

Re: Why isn't Haskell popular in industry?

#89
post #9

Failing to work on Windows is a much bigger problem than I think most people realize. You can write Java on Windows and (mostly) have it run on Linux or Solaris with no problem. And Windows has a 95%+ share in the corporate OS market. Ruby on Rails has a similar problem (though it's got better on Windows recently), and so does Django, which is a nightmare to get working in a Windows environment.

I'm not sure that these are really the same market share segments. Django, Rails and all that server side stuff is best run on servers, which more often than not, are going to be running a *nix. Windows has C# and all that, and it works nicely for them. Perhaps this leads to a wider question of who the Haskell audience really is and what problems they think they solve. Lots of languages have pigeon-holes, Ruby has it…

I think the issue here is buy in from management. If I work at a Windows-centric shop, it's much easier to sell a different platform if it doesn't require building new servers for it. It's much harder to pitch a project when your requirements include new OSes and servers.

For example, I work at a Windows-centric shop, but if I could make a compelling case to build a tool/product on a different platform, I could get my boss to approve it if it didn't require a new piece of hardware. We have written tools in other languages besides C#, but we stick to languages that are easy to deploy on our current servers.

Re: Why isn't Haskell popular in industry?

#90
post #47

Haskell is not popular because to be popular you must cater to the average Joe. And to cater to average Joe your foremost goal must be not making him uncomfortable about himself. Never forget this. And since most average Joes just work to pay their bills, they don't give a damn about technical superiority, you know.

Speaking as a very experienced average Joe, all I need to see is a use case that shows how learning all of the weirdness discussed in the other comments in this thread will help me do my job. I can't remember the last time I had trouble getting something done in C because it didn't support Kleisli arrows, or whatever.

Thanks for pointing this out, too.

Indeed Haskell lacks a proof of concept of its superiority. And you can't provide such a proof with a few lines of code.

When I studied Erlang, I was flabbergasted by both code size reduction and expressiveness thanks to pattern matching, by its fault tolerant capabilities, by its hot-code swapping... then reading how Yaws was alive and kicking long after Apache died under heavy load.

Post reply on HN