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.

"F# async on the server side" - node.fs in waiting?

36 pointsby hugorodgerbrownalmost 14 years ago

6 comments

jinushaunalmost 14 years ago
The article compared "async" C# to async F# and makes the claim that F# is better because of the lighter syntax. The only problem is that they're using the wrong version of C#. C# is expected to get the same async feature in the next version. Version 4 brought dynamic features to C# and completely changed the language. Version 5 is expected to bring async and change how people use C# again.<p>It's really slick and MS should really be commended for their work on it. It makes writing asynchronous code as straightforward as writing regular code. No crazy callbacks. That's what is so great about the CLI. All the .NET languages get an upgrade when the CLI gets an upgrade. All the work done to support Python and Ruby on .NET led to the dynamic and functional features of C# 4.
评论 #2682805 未加载
评论 #2683615 未加载
评论 #2683285 未加载
评论 #2683769 未加载
评论 #2688801 未加载
DanielBMarkhamalmost 14 years ago
As soon as I saw node.fs, I knew it had to be done in F# (preferably with Mono). It's just too good not to be done. All the goodness of functional-reactive servers with the .NET pantheon of libraries thrown in.<p>I especially like the code/time comparisons at the bottom. For those C# and other .NET guys, yes, you can do the same thing in any .NET language. That's not the point. What F# brings is the ability to think and write code in a quicker, more concise manner that's also more error-free. Modern coding environments are more and more lending themselves to FP.
hugh4lifealmost 14 years ago
It would be great to see an F# aync http server combined with something like WebSharper(which allows writing a lot of javascript in F#).<p><a href="http://websharper.com/samples/Canvas" rel="nofollow">http://websharper.com/samples/Canvas</a><p><a href="http://websharper.com/samples/WebGL" rel="nofollow">http://websharper.com/samples/WebGL</a><p>Get it to work on Mono and it would be Mono and F#'s killer app(stack).
评论 #2683618 未加载
hugorodgerbrownalmost 14 years ago
NB I found this after listening to a podcast about IronJS, during which Fredrik Holmström mentioned that F# would be a much better starting point for an async http server.
评论 #2682925 未加载
mdpmalmost 14 years ago
<i>cough</i><p>There are things like <a href="https://github.com/panesofglass/frack" rel="nofollow">https://github.com/panesofglass/frack</a> already. That's not the only one. This entire approach running on the stack and frameworks it can is a massive deal, and running silent at present.
j_salmost 14 years ago
For semi-related further reading, here is the second in a blog series extending async F# in the context of developing GUIs:<p><a href="http://tomasp.net/blog/safe-gui-async.aspx" rel="nofollow">http://tomasp.net/blog/safe-gui-async.aspx</a>