TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why isn't Haskell popular in industry?

68 点作者 ab9将近 15 年前

15 条评论

stephenjudkins将近 15 年前
I think there are a couple reason.<p>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.<p>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.<p>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.
评论 #1567068 未加载
评论 #1567020 未加载
lelele将近 15 年前
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.<p>And since most average Joes just work to pay their bills, they don't give a damn about technical superiority, you know.
评论 #1567235 未加载
评论 #1567295 未加载
评论 #1567476 未加载
评论 #1567342 未加载
Niten将近 15 年前
I think the main issues are that lazy evaluation makes it more difficult to reason about the performance of your code, both in terms of what actually gets computed in which thread / on which core, and in terms of space requirements (lazy evaluation can force the runtime to keep things referenced longer than you might expect offhand). I'm not saying a good Haskell programmer can't overcome these obstacles, just that this is definitely a perceived barrier to commercial Haskell development.<p>Check out this paper for a discussion of these issues in a real world Haskell application:<p><a href="http://www.starling-software.com/misc/icfp-2009-cjs.pdf" rel="nofollow">http://www.starling-software.com/misc/icfp-2009-cjs.pdf</a>
seldo将近 15 年前
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.
评论 #1566740 未加载
评论 #1567032 未加载
评论 #1567238 未加载
nephesh将近 15 年前
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).
d0m将近 15 年前
Even thought I don't agree on this argument, I would add:<p>- Because it's not OO.
评论 #1566741 未加载
theli0nheart将近 15 年前
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 -&#62; C), a company (Google -&#62; Python), or a library (Boost -&#62; C++), there is always a <i>force</i> behind adoption.<p>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 right now, as are Scala and (arguably) Haskell.<p>We'll just have to see. I honestly hope Haskell becomes popular. Judging by <a href="http://shootout.alioth.debian.org/u32/haskell.php" rel="nofollow">http://shootout.alioth.debian.org/u32/haskell.php</a>, performance really isn't an issue. It's more of just an issue of programmer adoption and a willingness to throw yourself out there to spend some time to learn how to think outside of the imperative programming box.
评论 #1566704 未加载
评论 #1566663 未加载
评论 #1567435 未加载
评论 #1567280 未加载
评论 #1566727 未加载
zv将近 15 年前
Well I've read comments so far and I did not see anyone mentioning this.<p>I program both on desktop and on web.<p>On desktop I program C# which is mediocre and recently I have started using C++ with Qt. Qt has huge advantages over C# (QtCreator is IDE that is going to be better in time than Visual Studio, currently it lacks few features, but still I find it usable). On both languages I have my set of libraries which you can't find everywhere else and make my life easier.<p>On web I use php and sometimes I use Rails. Each has advantages, I use php cause I've used it since php3 so a lot of historical baggage. On each I have my set of code and libraries I use the most.<p>So lately there's a whole new languages and frameworks coming out. Why should I spend my time porting my libraries to Haskell? Do I get significant advantage coding in it? No, because I use mostly my own libraries.
nradov将近 15 年前
Because it doesn't run on the JVM.<p>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.
评论 #1567164 未加载
MissT将近 15 年前
Haskell's motto is "Avoid success at all costs!"<p>It succeeded.<p>I appreciate the fact that Haskell's designers don't look down on "average" programmers like the Java designers did but I think it's sad that they don't look at all.
dasil003将近 15 年前
Most code just doesn't need to be guaranteed correct, plain and simple. If more code did, then Haskell would be more popular.
j_baker将近 15 年前
Haskell's a statically compiled language. Wouldn't the "embeddable Haskell" the author proposes essentially be a library?
评论 #1567018 未加载
jberryman将近 15 年前
Actually a decent post and discussion.
rimantas将近 15 年前
Not to answer the question, but I can provide some reasons why I am not going to learn Haskell. I must say up front that I know next to nothing about the language, and my reason my sound very irrational, superficial and plain silly, however: it just looks ugly. That's it. I cannot imagine myself sitting all day and staring (or writing) something that looks like explosion on a regexp factory with ruins of Perl fallen through. True, the beauty is in the eye of the beholder, however even if I believe there are beautiful thing which may need considerable effort and understanding to appreciate the true elegance of it I cannot imagine such thing being ugly at the first sight. For me it just looks like a lot of effort went just to make it look different. <i>Maybe</i> it makes perfect sense once you learn it, but it just does not look elegant and thus kills all the motivation to try. This all of course is IMVHO.
评论 #1567181 未加载
评论 #1567166 未加载
评论 #1567195 未加载
codexon将近 15 年前
I outlined some of the problems a while ago:<p><a href="http://www.codexon.com/posts/why-arent-functional-languages-like-haskell-and-ocaml-popular" rel="nofollow">http://www.codexon.com/posts/why-arent-functional-languages-...</a><p>Short version: Haskell is harder than C while being slower and uses more memory. The main implementation GHC, comes with GPL concerns.
评论 #1566968 未加载
评论 #1567179 未加载