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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

What would it take for functional programming languages to cross the chasm?

5 点作者 davesnx将近 4 年前

2 条评论

retrac将近 4 年前
Haskell would conquer the world if it had a C-like DSL with C-like semantics. Think do notation with a state monad, on steroids. Thing is, there&#x27;s already a dozen homespun libraries of various kinds doing just that. As an extreme example (mostly just to prove the point): <a href="http:&#x2F;&#x2F;kormacode.blogspot.com&#x2F;2011&#x2F;11&#x2F;c-style-haskell_10.html" rel="nofollow">http:&#x2F;&#x2F;kormacode.blogspot.com&#x2F;2011&#x2F;11&#x2F;c-style-haskell_10.htm...</a><p>Which leads me to perhaps the real thing functional languages need. A standard way of doing things. Standard patterns for standard problems, familiar and normal, which the average programmer can recognize. This is related to the Lisp curse:<p>&gt; Lisp is so powerful that problems which are technical issues in other programming languages are social issues in Lisp.<p><a href="http:&#x2F;&#x2F;www.winestockwebdesign.com&#x2F;Essays&#x2F;Lisp_Curse.html" rel="nofollow">http:&#x2F;&#x2F;www.winestockwebdesign.com&#x2F;Essays&#x2F;Lisp_Curse.html</a> Most functional languages suffer from this to some degree.
armchairhacker将近 4 年前
&gt; What would it take for functional programming languages to cross the chasm?<p>&gt; (eg Elm, Rescript, Haskell)<p>Here is what it would take:<p>- An actual use case. An answer to &quot;why use Haskell instead of Java? Why use Elm instead of TypeScript?&quot; &quot;Superior in prod&quot; is not enough, I&#x27;m sorry but it&#x27;s just your opinion. I&#x27;ve used all of these languages, and IMO Haskell is definitely more fun, but I actually felt a lot less efficient and encountered harder-to-find bugs.<p>- A good IDE. This is a big reason why new projects use Java even though it&#x27;s so verbose. I&#x27;ve used many IDEs for Haskell and none come close to JetBrains or VSCode Java&#x2F;Kotlin&#x2F;Typescript&#x2F;C integration. The Haskell IDE even has spotty code completion - no matter how much faster and easier it is to write Haskell than Java, it&#x27;s not really faster or easier if I build my project and get 20 spelling errors.<p>- Good OS support. Good libraries. JavaScript sucks as a language but it&#x27;s the only language for the web, and it has NPM. Haskell actually has good libraries, although idk about OS support. But Elm doesn&#x27;t and it&#x27;s a walled-garden, which is a weird and IMO bad choice, especially considering that it competes with NPM &#x2F; JavaScipt.<p>I&#x27;m sure there are more that I didn&#x27;t mention, like a big company to adopt and promote your language.<p>Look at some of the new-era languages which <i>did</i> succeed:<p>- Rust. Rust is sometimes used for everything but it has a very specific niche: efficient, safe embedded programming. No well-known efficient languages (C, C++) compare to its safety, and no well-known safe languages (Ada, Java?) compare to its efficiency. Rust has <i>amazing</i> libraries, and an amazing package manager. Rust compiles to LLVM. And Rust has decent tooling (although IMO on this aspect it could be better, it&#x27;s still decent)<p>- Kotlin. Kotlin compiles to the JVM, so it supports all Java libraries and targets. Kotlin has <i>amazing</i> IDE support from JetBrains. Kotlin is the official language of Android, which means people &quot;have&quot; to use it.<p>- Go. Go is a great language and has great libraries for web services. Try writing a service in C vs. Go. Go also has great IDE support.<p>- Julia. Julia is a typed scripting language, particularly good for data science. Its data science competitors, Python and R, are untyped. Also, Julia has good IDE support and it&#x27;s starting to get good libraries.<p>- TypeScript. TypeScript is literally &quot;JavaScript with types&quot;. No other language integrates with the web as well except for JavaScript. And TypeScript is better than JavaScript (for many people) because it has types.