Visual Basic 2008
I wanted to let people know that an (almost) final VB 9.0 language specification has been posted on the download center. The spec is missing some copy-edits from the documentation folks, but is otherwise complete. Since I'm not going to get a chance to incorporate the copy-edits until I am back from vacation in January, I wanted to get the spec out there for anyone interested in documentation of the XML features that weren't present in the previous version of the spec. (I apologize for the lateness of this vis-a-vis the release of the product itself, it's been a busy...
Oh, yeah, that's right. We shipped. Hard to believe we've finally reached the finish line...
While I was visiting MSR Cambridge this week with some other people from Redmond, Beth put up the Beta 2 version of the Visual Basic Language specification on our developer center--so she got to beat me to the announcement! This updated language specification corresponds to Visual Studio 2008 and covers the following major new features: Friend assemblies (InternalsVisibleTo) Relaxed delegates Local type inferencing Anonymous types Extension methods Nullable types Ternary operator Query expressions Object initializers Expression trees Lambda expressions Generic type inferencing Partial methods The following features are not covered but should be shortly: XML Members...
As you may remember, a while back I solicited questions for MSDN Japan's "Ask the Experts!" page. Well, now the video I shot answering some of those questions is up. Check it out!
As a medium of communication, blogs have their strengths and weaknesses. The informal nature of the communication makes it incredibly easy to communicate information on an ongoing basis. The down side, of course, is that the very informality of blogs can also trip you up if you don't pay enough attention to follow up. I've certainly been guilty of that on this blog (there are still some loose ends I think haven't really been tied up), and we've been guilty of that as a team. One thing we haven't always done a good job of is keeping people apprised of...
One of the problems that we've run into when trying to get new platforms such as the Compact Frameworks or Silverlight to support Visual Basic is getting the VB runtime supported on the new platform. The VB runtime, besides having a bunch of user functions such as Left and MsgBox and such, contains a number of language helper functions that are required for the correct functioning of the language. For example, when you convert an Integer value into a String value, we emit a call to a helper that does the conversion for you, since there is no native IL...
As is always the case in a major release, there are a number of smaller features that don't get very publicized because they're not as big or sexy as the major features. One that someone asked me about privately in email was partial methods. VB will support them in pretty much the same way that C# does. In fact, rather than writing a big, long entry about it, you could just check out Scott Wisniewski's excellent entry on them. You can also check out Wes Dyer's excellent entry on them for C#.
How's that for lazy?
Updated 05/30/2007: Somehow I'd missed the...
About a month ago, the C# team announced that they were making anonymous types immutable in C# 9.0. The issues with mutable anonymous types are pretty well described in Sree's blog entry, but what it boils down to is this: in several places in LINQ, anonymous types are used as keys for things like grouping and filtering. For example, if you group customers by state and country, then the grouping is done on a composite key made up of the State field and the Country field in an anonymous type. To enable keys to be used to do grouping efficiently,...
Many months ago, I discussed the fact that we were finally planning to come up with a true ternary conditional operator that would allow short-circuited conditional expressions. (Just as a quick recap: the current problem with the IIF function is that it evaluates all the arguments since it is just a regular method call. So "IIF(x Is Nothing, "Empty", x.Name)" will throw an exception if x is Nothing, because we still evaluate x.Name.) At the time, we were considering taking the IIF function and making it intrinsic. In the end, this looked like it would just be too big of...
My +1 link postings are always the last ones in to the pool, but in case you haven't seen it elsewhere, Beta 1 of Visual Studio Orcas is now available for download! This has a large majority of the Orcas features for VB in it, although there are still some features that will be coming in post-Beta1 (lambdas, nullable types, etc.) because of the way the schedule came together. (You can find more details about new features in Beta1, such as "Intellisense everywhere" on our team blog.) I've been writing a LOT of Visual Basic code in the past couple...
Full Visual Basic 2008 Archive