3 ms·
Asynchrony in C# 5
- sriramk 16y agoThere's a talk by Anders Hejlsberg going on right now at http://player.microsoftpdc.com/Session/1b127a7d-300e-4385-af8e-ac747fee677a http://player.microsoftpdc.com/Session/1b127a7d-300e-4385-af... Eric Lipper has a good post at http://blogs.msdn.com/b/ericlippert/archive/2010/10/28/asynchrony-in-c-5-part-one.aspx http://blogs.msdn.com/b/ericlippert/archive/2010/10/28/async... This is particularly interesting to me since I've been writing a network bound Windows Phone app. Writing concise code to express 'Do network work foo, don't block UI thread, let me cancel if necessary, execute this piece of code when done, execute this other piece of code on failure' has been challenging and makes my code ugly. I love how this makes it simple
- luffy 16y agoLooks like C# is borrowing even more from the F# playbook. Though from the looks of it, I still like the F# implementation better. Next in C#: workflows ( aka F# monads ). I really wish they had dabbled more in dynamic programmic. I'd have loved to see something akin to Python's multiple inheritance. ( EDIT: is this technically dynamic? :p )
- palish 16y ago"Dynamic programmic" would be a sweet name for a band.
- sosuke 16y agoAnders Hejlsberg gives an introduction in this video where he mentions F# as a reference for ideas at the very beginning: http://channel9.msdn.com/Blogs/Charles/Anders-Hejlsberg-Introducing-Async http://channel9.msdn.com/Blogs/Charles/Anders-Hejlsberg-Intr...
- fleitz 16y agoTechnically, no, dynamic programming just means solving smaller problems as part of a larger problem. eg. dykstras algorithm for a shortest path, or a merge sort. I think you're thinking of dynamic typing, which .NET and F# have, kinda, (via dynamic method invocation). In F# to invoke a method dynamically use the ? operator. x.Bar() # static call x?Bar() # dynamic call in C# to do a dynamic call cast the object to Dynamic. ((Dynamic)x).Bar(); // dynamic call ((IFoo)x).Bar(); // static call Also, you can do multiple inheritance in a static language, C++ as an example.
- akamaka 16y agoI went to watch the video titled "Anders Hejlsberg: Introducing Async – Simplifying asynchronous programming", and I got a message saying "To view this content, please install Silverlight". I hate getting involved in bashing any company, including Microsoft, but this is just infuriating, and it feels like an insult. I have had to write web applications which encode video into multiple formats to ensure that visitors to my website doesn't have any problem viewing the videos. It's a hassle, but also not terribly hard. I have a good friend who works for Microsoft, and I respect the people there, and I know that there's no shortage of talent, and no reason why they can't implement video formats that I can view on my Mac. I just don't get why they want to force me to install Silverlight.
- kevingadd 16y agoSilverlight works on the mac. Quicktime might be included with your mac, but it's still a browser plugin just like Silverlight and Flash and it's not included with windows computers.
- kylecordes 16y agoThe annoyance is that a plugin is required for content that is quite readily publishable as a file type that could easily be processed by many brands of computers and browsers. Video is such content, in 2010. When I publish video, even if I happen to use a Flash plugin viewer (for convenience), I usually also offer a link to the video file.
- MarkSweep 16y agoThey are using some sort of a fancy streaming protocol that auto-adjusts the quality to match your bandwidth. While this sounds like a cool idea on the face of it, it ends up meaning I can't force it into HQ which I know I have the bandwidth for. Thus the code is all blurred out.