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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Translation from Haskell to JavaScript (Introduction to monads)

64 点作者 khingebjerg大约 14 年前

2 条评论

tumult大约 14 年前
In the author's own words: <i>I should stress that this is very hand-waving imprecise definition...</i><p>I don't want to be too hard on this guy, but this is a bad article. Sorry. This article uses incorrect terms to define things. It also doesn't explain or illustrate why monads are useful. You cannot read this article and learn anything about monads.<p>It's not useful on a theoretics level, and it's also not useful on a practical Haskell level. I don't think the author understands what he is writing about. (Don't get me wrong, by the way – it's totally fine to write about something you don't understand in order to learn more about it. But maybe don't publish it prominently on your website and peddle it out to newbies as learning material.)<p>The overabundance of bad monad articles is making it harder for Haskell newbies to learn. There are many good, free resources for learning about Haskell, such as <i>Real World Haskell</i>. This is not one of them.<p><i>Think of a monad as a spacesuite full of nuclear waste in the ocean next to a container of apples. now, you can't put oranges in the space suite or the nucelar waste falls in the ocean, BUT the apples are carried around anyway, and you just take what you need.</i> - Dons, talking about bad monad explanations<p>edit: also, if you're really interested in seeing what a Haskell monad looks like literally translated into JavaScript, I wrote a comment here on HN a year ago with some code: <a href="http://news.ycombinator.com/item?id=1275860" rel="nofollow">http://news.ycombinator.com/item?id=1275860</a> I could leave better comments if I wrote it again today, but the code is correct and works.
评论 #2305195 未加载
评论 #2305360 未加载
评论 #2305113 未加载
评论 #2305361 未加载
joeyh大约 14 年前
Anyone else disappointed that this was not about machine translation of Haskell to Javascript, with some sort of DOM monad?<p>While Haskell -&#62; Javascript has been done before, all the examples seem toys without a rich integration into the browser.