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.

Is Haskell a Good Choice for Web Applications? (2009)

93 pointsby dmitriy_koover 13 years ago

5 comments

danieldkover 13 years ago
Please update the title to indicate that this was written in 2009. In the meanwhile, Haskell has gained (besides Happstack) two excellent web frameworks: Snap and Yesod.<p>One of the points of critique has been addressed now is database access. For instance, Persistent provides type-safe database access:<p><a href="http://www.yesodweb.com/book/persistent" rel="nofollow">http://www.yesodweb.com/book/persistent</a><p>The author also mentions the problem that exceptions can only be caught in the IO monad. But this has become less of a problem, since more people started using monad transformers (such as ErrorT) to add error handling to their monads. ErrorT allows you to catch exceptions within that monad. For instance, quoting from one of my own projects:<p><pre><code> readEntry :: MonadIO m =&#62; Corpus -&#62; String -&#62; ErrorT CorpusError m Text </code></pre> <i>readEntry</i> is a function that takes a <i>Corpus</i> and a <i>String</i>, and returns <i>Text</i> in a monad of the class <i>MonadIO</i> if the function is successful. Otherwise it reports errors in the form of a <i>CorpusError</i>. You could now, for instance, run this function with <i>runErrorT</i>, and it will return an ordinary <i>Either</i> value in the given monad (<i>Left CorpusError</i> in the case of an error, <i>Right Text</i> when the call is successful).
评论 #3303413 未加载
jnbicheover 13 years ago
As someone who's learning Haskell, I read the post because I'm interested in the language's capabilities in the web arena. But your site itself is brilliant! You are really on to something with vocabulink.com. I've formally studied 10 human languages, of which I can speak/write/read 3 fluently, and have passive understanding of another 2-3. People often ask me how I learn languages, and a good part of my answer is very similar to what you are doing with vocabulink. As you've discovered, the key is to use vivid, even silly, mnemonic devices. Building up a large vocabulary is key to learning a language. Don't waste your money on flashy tools like Rosetta Stone -- they don't work for most people above the age of 8 or 10. Adults learn differently than children.<p>So if someone out there is looking to learn a foreign language, my recommendation is to combine vocabulink's approach to build up a large vocabulary, and find the best concise grammar available for your target language. If you don't remember grammar fundamentals (e.g., what's a prepositional phrase, direct object, relative pronoun, etc.), then you need to find a good book in your native language to review those concepts.<p>In any case, cool concept for a web site. Sorry for the off-topic post. Thanks for telling us about your experiences with Haskell. I do think that Haskell web capabilities have come a long way since 2009, particularly Yesod (I'm not familiar with Snap).
sp00nmanover 13 years ago
How secure are these Haskell web frameworks? (snap, happstack, etc.). Without a django and rails level of exposure, presumably they have quite a few holes still?
评论 #3303452 未加载
评论 #3303794 未加载
评论 #3304066 未加载
scarmigover 13 years ago
I've been wondering how well-suited FRP (implemented either in Haskell or something else) is for back-end technology. It seems like it might be overkill, but it does have a certain conceptual elegance to it.<p>Anyone play around with this idea?
评论 #3306269 未加载
dustingetzover 13 years ago
the source link[1] doesn't work for me. anyone know where i can find this document?<p>[1] <a href="http://jekor.com/vocabulink/vocabulink.pdf" rel="nofollow">http://jekor.com/vocabulink/vocabulink.pdf</a>
评论 #3304460 未加载