Azure and C# 4.0 at PDC
601 words.
Most of the buzz from Microsoft’s PDC is about Azure and C# 4.0. I don’t usually pay too much attention to bleeding edge Microsoft technology until it might actually be used in real-life situations, but I thought I’d break from tradition and peek at these two shiny new things.
There isn’t a lot of concrete information available on Azure yet, so there isn’t much to say about it. Conceptually, it’s a specialized web hosting service from Microsoft for your ASP.NET web apps. It’s specialized because it’s designed for the large numbers of processors and mass storage requirements needed for large-scale enterprise applications (large-scale as in, for example, Amazon or Facebook or Google).
From a programmer perspective, I gather that the main difference from a regular web app is that the details of the OS and hardware your application is running on is abstracted away from you. For example, instead of your web app reading and writing files with the System.IO namespace, you’ll use SQL Services to read and write “blobs.”
I personally can’t think of any applications I might use Azure for. (Do we really need another Amazon?) It would have to be something mandated by a pointy-haired boss-type.
As for the “cloud computing” part of it; well, I’ve said before that I don’t much care for cloud computing. Besides all the privacy and data loss concerns, the bottom line is that “the cloud” is meant to make life easier for developers, not users. As a user, I might store a copy of something in the cloud for convenience, but I would never use the cloud as my main work area.
Recall that C# 3.0 gave us query syntax, extension methods and the “var” shortcut, and tried to change us to functional programmers with lambdas. With the possible exception of LINQ, I personally have not yet encountered a situation where I thought any of those things would make my code better.
So what can we expect from C# 4.0? Among other things, dynamic types. That’s right, in the continuing effort to put back all the bad things we didn’t like about VBScript and C, the variant and void* is back. For all those people who simply can’t decide how to declare your variables, you can now circumvent all pre-planning and simply write, “void myfunction( dynamic myparam )”. Is that parameter a string? Is it an int? Is it a custom object? Is it an array? Who knows? Guessing is half the fun!
I kid of course. You could assume it’s an object of some kind.
I’m sure there are situations where it is more convenient to use “dynamic” than an interface. (Just like there were plenty of occasions to use void* types and variants.) Offhand, I can’t think of any, but I’m sure they’re out there somewhere.
The problem I see with dynamics is that, as with any “advanced” language feature that circumvents the “KISS” principle, it leaves the door wide open for the inexperienced to abuse it unmercifully. When you go too far down that road, you end up with Perl, a language almost entirely composed of symbols.
It looks like almost all of the new C# 4.0 features were designed to improve COM Interop, which is something I don’t have much use for. I have exactly one COM component project, and if I ever need to use it again, I plan to upgrade it to managed C++.
I do like the idea of finally having optional parameters, though. That’s something I’d use (sparingly!), as long as it compiles down to the .NET 2.0 CLR.
Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.