Hacker News new | ask | show | jobs
by taylodl 1467 days ago
Unpopular opinion - Haskell was intended for research and learning, not so much for mainstream production code. I'm not saying you can't use Haskell for that purpose, but you should think long and hard before doing so. If the answer is still yes then go back and make sure you've thought long enough and hard enough! :)
2 comments

Haskell is fine for production code. You just need to know what you're doing, and not go crazy with abstraction.
You just need to know what you're doing

The problem is that there just aren't that many people who choose to invest in learning Haskell -- or for that matter, the essential-to-master nooks and crannies of Rust. And the learning curve to get there is intrinsically steeper that for, well, all those "dum-dum" ducktyped and/or mostly procedural languages one imagines you don't particular care much for, now do you.

Of course it's known that some shops, like Jane Street, have gone whole hog on FP and have managed to do all right, it seems (even arguing that "the fact that the learning curve for our bread and butter is significantly higher than for the usual college-taught languages is a feature, not a bug").

That may work if have the same brand recognition (not to mention salary and bonus pool available) as Jane Street. And even then, it's not exactly proven that large-scale FP worked out so well for them. Just that they didn't tank.

But if you don't have their clout and resoures... from first principles, you should probably think twice before making the same bet that they did.

> now do you Depends. I like JS ok. I really like Lisps. I miss doing Ruby sometimes. I've been doing more Python lately and find it rather distasteful, all this tooling is just so so complicated for very dubious guarantees/benefit. Not all of us are a sum of tropes.

The main thing that I find frustrating is that the actual act of programming in an impure language is so much harder. Haskell is def harder to learn, like 10x at least imo. Especially for a mainstream dev. But, once you know it, there is a simplicity to what you're doing which is very easy to do. I find myself having to just think so hard when writing python. "what exacty does this function do? Oh it calls this other function, I have to go check that one." etc. And then with a myriad of control flow issues, and random syntactic "sugar" to contend with...

There are a number of haskell companies, not just Jane street, and they do pretty well. If you don't follow the space closely, it is not surprising that you don't know about it. But there are. Not nearly as many as Python or whatever, but the appeal to the popular is def problematic: mostly because, at one point python itself was a radical new thing, full of skeptics like "if its so great, why don't more people use it".

Many ideas from haskell/typed fp are slowly making their way out into the larger community. Witness Swift, Kotlin, Java, numerous features in C#, etc. People like them.

Its fine if you don't like Haskell and don't want to use it. But its not an insane choice.

Haskell community really needs to do better at making it easier to get started though. Eventually I hope to contribute to that.

You remind me that it's not the language that people use per se, it's the frameworks. Python has been around for 30 years. It was NumPy and SciPy that propelled it to the phenomenon we know today. Likewise with Ruby. I remember when Ruby was released in the mid 90's and wondering why would anyone use this language? Ten years later the Rails framework appeared and suddenly Ruby was a language that went mainstream.

Honest question - does Haskell have such a compelling framework driving its adoption? Or does Haskell suffer the "curse of Lisp" and people just create whatever they need when they need it and no big framework ever gets developed that drives adoption?

> compelling framework

Sadly no. There are contenders for this that have arisen over the years, but we don’t have a RoR for Haskell yet.

If you’re curious, here is a talk that goes into this problem. It’s very accessible IMO. https://youtu.be/fNpsgTIpODA

To be honest, the compelling reason to learn Haskell for me was so I could engage with various academic literature. I just kept running into things I didn’t understand which were tangential to the topic of the paper, and it seemed like the most straightforward way to solve this was to start with learning Haskell. Once I learned it, I realized I was wrong in my biases, and Haskell is a fantastic tool for normal programming, with some important caveats.

But then it actually does get back to the language because the reason people build NumPy and SciPy (and Django and tons of stuff in other domains) is that Python is, after all (despite its warts) so damn easy to use. Making it easier to build all that stuff, and more rewarding also (because there's an audience).

Which is not an extra but in fact means a heck of a lot for a language's chance at long-term acceptance.

Yep, this is absolutely a problem. Beginner-friendliness is huge, and we need to keep working on it.
How do you know it didn’t work out very well for them and they keep it quiet just so the competion doesn’t gain the same advantage? There is that possibility or it could be that the same team would be capable enough to change the stack and paradigm and get more or less the same results, with some twist and a different flavor. It’s hard to know for sure I think.
We don't know of course; nor do we have any reason to believe it does work.

But as for "keeping quiet" -- that they aren't doing at all. They are (or at least were, when I last paid attention to this stuff) extremely forward about their belief in FP as part of their secret sauce for staying ahead of the competition.

Which, ironically, makes one further question whether it has all that much benefit. Because if it really did ... yeah, they'd probably want to keep quiet about it. Like any other truly winning strategy in their arsenal.

It's the same for all languages, premature abstraction is a plauge in this industry.
Yep. But sadly Haskell does give you more rope to hang yourself with. Refactoring and normal development is so easy and then people use all that power to go nuts. Such a shame.
Haskell culture is all about exploration, which means you do not know what you are doing, by definition. A large part of that exploration revolves around abstraction.
You shouldn't make the job harder than it needs to be. The main danger is using tools/techniques you don't know well. Learn radical new approaches on your own time. Don't bet the farm on the latest free monad framework which has 10 downloads on hackage.
I don't think that's an unpopular opinion among realistic, practical people