TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Haskell Problems for a New Decade

225 pointsby psibiover 5 years ago

9 comments

sirabenover 5 years ago
<p><pre><code> Most undergraduates take a compiler course in which they implement C, Java or Scheme. I have yet to see a course at any university, however, in which Haskell is used as the project language. [...] The closest project I’ve seen to this is a minimal Haskell dialect called duet. </code></pre> Ben Lynn has been working on such a Haskell compiler[0], self-hosting and with IO too. It&#x27;s a little unusual in its approach to compilation (targets combinatory logic and executes via graph reduction), but it&#x27;s a great example nonetheless, from which one could build an undergraduate course.<p>Code generation is a difficult issue, compiling a lazy functional language to assembly could easily fill up two semesters of classes alone.<p>The VM in C is really small and the compiler can be built up incrementally[1].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;blynn&#x2F;compiler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;blynn&#x2F;compiler</a><p>[1] <a href="https:&#x2F;&#x2F;crypto.stanford.edu&#x2F;~blynn&#x2F;compiler&#x2F;quest.html" rel="nofollow">https:&#x2F;&#x2F;crypto.stanford.edu&#x2F;~blynn&#x2F;compiler&#x2F;quest.html</a>
评论 #22143123 未加载
评论 #22143115 未加载
评论 #22142884 未加载
pronover 5 years ago
This post highlights my biggest problem with the language: it&#x27;s about the <i>how</i>, not about the <i>why</i>. For example, dependent types. They add significant complexity to the language and are intended to help with correctness. But are they an effective way to achieve it compared to alternatives? The fact that even current formal verification <i>research</i> is mostly looking elsewhere seems to suggest that the answer is likely negative, so why focus on them now? Or algebraic effects, about which the article says, &quot;These effect-system libraries may help to achieve a boilerplate-free nirvana of tracking algebraic effects at much more granular levels.&quot; But is that even a worthwhile goal? Why is it nirvana to more easily do something that might not be worth doing at all?<p>Researchers who study some technique X ask themselves how best to use X to do Y, and publish a series of papers on the subject, but practitioners don&#x27;t care about the answer to that question because they don&#x27;t care about that question at all. They want to know how best to do Y, period. One could say that every language, once designed, is committed to some techniques that it tries to employ in full effect. But any product made for practical use should at least strive to begin with the <i>why</i> rather than the how, both in its original design and throughout its evolution. I work with designers of a popular programming language, and I see them spending literally years first trying to answer the why or the what before getting to the how. So either Haskell is a language intended as a research tool for those studying some particular techniques -- which is a <i>very</i> worthy goal but not one that helps me achieve mine -- or it&#x27;s intended to provide entertainment for practitioners who are particularly drawn to its style. Either way, it&#x27;s not a language that&#x27;s designed to solve a problem for practitioners (and if it is, it doesn&#x27;t seem that testing whether it actually does so successfully is a priority).<p>I think it&#x27;s important to have languages for language research, but if that&#x27;s what they are, don&#x27;t try to present them as something else. And BTW, at ~0.06% of US market share -- less than Clojure, Elixir, Rust and Fortran, about the same as Erlang and Delphi, and slightly more than Lisp, F# and Elm -- and little or no growth (<a href="https:&#x2F;&#x2F;www.hiringlab.org&#x2F;2019&#x2F;11&#x2F;19&#x2F;todays-top-tech-skills&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.hiringlab.org&#x2F;2019&#x2F;11&#x2F;19&#x2F;todays-top-tech-skills&#x2F;</a>), I wouldn&#x27;t call Haskell a &quot;popular language,&quot; as this post does, just yet.
评论 #22140487 未加载
评论 #22138546 未加载
评论 #22138760 未加载
评论 #22142264 未加载
评论 #22138505 未加载
评论 #22138522 未加载
评论 #22143293 未加载
评论 #22139621 未加载
评论 #22137818 未加载
评论 #22164302 未加载
评论 #22138784 未加载
评论 #22138509 未加载
mlthoughts2018over 5 years ago
&gt; “ Many of the large tech companies are investing in alternative languages such as Swift and Julia in order to build the next iterations of these libraries because of the hard limitations of CPython.”<p>I would be interested in evidence of this. I work at a big tech company in ML and scientific computing, and have close peers and friends in similar leadership roles of this tech in other big companies, FAANG, finance, biotech, large cloud providers, etc.<p>I am only hearing about the adoption of CPython skyrocketing and continued investment in tools like numba, llvm-lite and Cython. At none of these companies have I heard any interest in Julia, Swift or Rust development for these use cases, and have heard many, many arguments for why Python wins the trade-offs discussion against those options.<p>In fact, two places I used to work for (one a heavy Haskell shop and one a heavy Scala shop) are moving away from those languages and <i>to</i> Python, for all kinds of reasons related to fundamental limitations of static typing and enforced (rather than provisioned) safety.<p>I mean, Haskell &amp; Scala are great languages and so are Julia &amp; Swift. But even though in some esoteric corners people have started to disprefer Python, it’s super unrealistic to suggest there’s large movement away from it. Rather there’s a large move <i>to</i> it.<p>It reminds me of the Alex Martelli quote from Python Interviews,<p>&gt; “Eventually we bought that little start-up and we found out how 20 developers ran circles around our hundreds of great developers. The solution was very simple! Those 20 guys were using Python. We were using C++. So that was YouTube and still is.”
评论 #22138050 未加载
评论 #22137487 未加载
评论 #22138084 未加载
评论 #22138643 未加载
评论 #22137476 未加载
anentropicover 5 years ago
&gt; If you look at the top 100 packages on Hackage, around a third of them have proper documentation showing the simple use cases for the library.<p>This is still very very poor, and one of the biggest problems faced by newcomers to the language (speaking as one myself...)
评论 #22139227 未加载
eli_gottliebover 5 years ago
I&#x27;m going to give the same Haskell hot-take I gave on Twitter while at NeurIPS in December: the problem with Haskell is that you can port the awesome parts of pure, compositional abstractions over to Python, far more quickly than you can port really good domain-specific libraries and applications over to Haskell. My experience was that porting some nice ADT-based machinery to Python, using an available ADT library, took roughly one weekend, whereas porting the major domain-specific package I needed from Python to Haskell would take months to years.<p>I love Haskell. I prefer to use Haskell when I can. Haskell is a language in which I can Achieve Enlightenment. But apparently, God help me if I need to do some heavy graph processing or CUDA numerics in Haskell.
评论 #22154403 未加载
评论 #22138334 未加载
mark_l_watsonover 5 years ago
Great forward thinking wish list!<p>I have a strange relationship with Haskell. I love Haskell repl driven development of pure code for playing with algorithms and ideas. I use Haskell in this use case much like I use Common Lisp and Scheme languages. However, I am not very good at writing impure code and the interfaces between pure and impure code. To put it more plainly, I enjoy the language and I am productive, but I suffer sometimes figuring out other people’s Haskell code.
socialdemocratover 5 years ago
Despite the positive tone, what really struck me in this article was that they struggle with getting people to work on the compiler because it is too complex.<p>It just confirms my main criticism against advance statically typed languages: They are simply too complex.<p>It is why I have more faith in languages like Julia, because you can achieve a tremendous amounts of power, expressiveness and performance in a relatively simple language.<p>Dynamic typing gives you simplicity in the type system which is impossible to achieve with static type checking.<p>Long term this has profound implications. People can keep hacking on and expanding Julia because they can wrap their head around the language. You don&#x27;t need to be Einstein to grok it.<p>I think you may also see Clojure overtake Scala for the same reason. The simplicity of Clojure may in the long run overtake Scala although Scala benefits a lot from similarity to Java at a superficial level.
评论 #22137846 未加载
评论 #22137805 未加载
评论 #22137590 未加载
评论 #22138076 未加载
评论 #22137677 未加载
评论 #22137681 未加载
评论 #22138755 未加载
评论 #22138044 未加载
评论 #22139583 未加载
评论 #22137902 未加载
评论 #22146072 未加载
coolplantsover 5 years ago
Big issue with Haskell adoption is the number of hoops you have to jump through to write efficient code in it. Haskell abstracts away the idea of a procedural VM implementing the code underneath, but you often need that exposed to finagle your code into a form that’s efficient.<p>Haskell programming ethos is opposed to that, the language wants people to focus on the semantics of computation not the method. Yet we must be able to specify computation method if we want our programs to operate efficiently.<p>The truth is that the Haskell compiler will never be able to automatically translate idiomatic Haskell code into something that’s competitive with C in the common case. once you start finagling your haskell code to compete with C you’ve negated the point of using Haskell to begin with.
评论 #22138012 未加载
评论 #22139019 未加载
评论 #22140601 未加载
评论 #22138589 未加载
thrower123over 5 years ago
Haskell&#x27;s main problem is that it is over-zealous, and built on axioms that make it a poor fit for real people writing real code. Everything else flows from that core issue. Functional purity and lazy evaluation are interesting, but when you can&#x27;t toss a printf debug or log statement into a function without changing function signatures all the way up, it&#x27;s not going to be popular.<p>Pragmatic, sloppy languages will always be more popular, because they are more forgiving.
评论 #22137927 未加载
评论 #22137996 未加载
评论 #22138103 未加载
评论 #22138987 未加载