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...
For those of you who might be curious about how the XML integration features in VB9 work, there's now a great screencast up on Channel 9 that walks you through them while building a sample application: The next version of VB .Net adds Xml as a built in data type using the new LINQ to XML API. As a built in data type, VB 9.0 provides the ability to create XML using XML Literals and to query XML documents using XML properties. This webcast contains a demo by David Schach, the lead developer in this project, of creating a...
Maybe you've seen this elsewhere, but the big news of the week (VB-wise, at least) is that the March 2007 Orcas CTP is now out. Those of you who've been following along with the previous Orcas CTPs will have noticed the paucity of new VB features relative to some of the other VS languages. This has been largely due to the different implementation strategies of the languages--since the Visual Basic compiler is so closely tied to the IDE services, we needed to really plumb the features all the way through before we could consider them "complete." Anyway, many of these features...
Well, I have to say that in some ways it's great to be back at work, and in some ways, not so much. Everything's going great at home, and now it's time to get back into the swing of things. Two links for people who might have missed them (but I doubt many people did): A series by Scott Wisniewski on extension methods in VB9 A post by Avner Aharoni on XML changes in the Feb CTP of VB9 More as I dig through my email!
One of the things we've been discussing for VB 9.0 is adding a true ternary operator to the language. It's been a persistent source of annoyance for myself (and many others, to judge from suggestions and complaints we've gotten over the years) that there is no short-circuiting conditional expression operator in the language. True, there's the IIF method which does most of what you want, but it doesn't short-circuit. If you evaluate "IIF(x Is Nothing, 10, x.Foo())" and x is Nothing, then you'll get an exception because we always evaluate all of the arguments of a method call (since IIF...
Well, I'm glad to see that even with my writer's block, people still seem to be reading the blog! Although there is definitely a diversity of opinion, the majority of people seem to prefer the "Function" syntax of the choices I laid out, which is not exactly what we expected. (We were wagering people would go for the more cryptic, compact syntax. Shows what we know...) That's the syntax you should expect to see in the beta, and if public opinion shifts over time in the beta, we'll deal with that feedback if and when we come to it. After...
Lots of code has been flowing out of Redmond recently: Two Visual Basic 2005 Power Packs have been released. The Microsoft Interop Forms Toolkit 1.0 and Microsoft PrintForm Component 1.0 are both targeted at people who use COM and VB6 and should make migration of code easier in many cases. You can get them here, and more are likely to come. Beta 1 of VS 2005 Service Pack 1 has been released. This service pack includes a significant amount of work on the part of the Visual Basic compiler team and addresses a lot of the major issues (performance or...
FYI, we just released an updated community preview of our LINQ support for both VB and C#, entitled “Microsoft Visual Studio Code Name “Orcas” Language-Integrated Query, May 2006 Community Technology Preview.” Or you could just call it “the May CTP.” Anyway, this new CTP has a lot of new goodies for VB programmers, as our LINQ support is greatly expanded. To crib straight from the readme, here’s some of the stuff we did:
Enhanced DLinq Support: This CTP adds support for Inheritance, Stored Procedures, User-Defined Functions, and Optimistic Concurrency Conflict Resolution (OCCR). The new DLinq Designer provides a visual design surface...
We’ve been hard at work on an updated CTP of the LINQ work, and when you get it (no comment on dates at this point), you’ll notice several new things about the VB LINQ support. One the biggest is going to be the fact that, after trying all the Intellisense tricks we could think of, we’re throwing in the towel on Select/From and adopting the “Yoda style” From/Select syntax. As in:
Dim WACusts = _
From c In Customers _
Where c.State = "WA" _
Select c
instead of:
Dim WACusts = _
...
There is a saying that “no one is more zealous than a convert,” and I think Erik is out to prove that in spades… <g> Check out his two new papers: “XML Support in Visual Basic 9” (with Brian Beckman) and “Confessions of a Used Programming Language Salesman.”
Over a month ago, I asked what a particular chunk of code should do:
Module Module1
Sub Main()
For i As Integer = 0 To 2
Dim x As Integer
Console.WriteLine(x)
x += 1
Next
Console.ReadLine()
End Sub
End Module
I purposefully left the question open and vague because I wanted to see what the community feedback would be without any kind of preconceived notions. I didn’t expect for it to take me so long to return to this question, so I apologize if people got frustrated waiting, but I do want to get...
Avner has posted some information on updates that we’re planning on making to the XML integration feature in our next VB 9.0 CTP. Check them out and let us know what you think!
I know this is old news, but I’ll say it anyway: several weeks ago, we released an updated preview of our proposed 9.0 features. The preview is enhanced in four primary ways:
We now support some Intellisense for Select expressions. This is a step forward in our investigation of the Select/From vs. From/Select question, so we’re definitely interested in feedback here.
We now support a lot more LINQ, specifically DLinq and variable capture (so you can now access local variables in queries). A huge chunk of my November/December went towards implementing lambda expressions and expression trees in Visual Basic and that, combined with...
I’m clearing out some old mail and I came across a reference to a blog entry by Jon Skeet about extension methods that I saved a while back. He says:
One of the things I don't like about the proposed extension methods is the way the compiler is made aware of them - on a namespace basis. "Using" directives are very common to add for any namespace used in a class, and quite often I wouldn't want the extension methods within that namespace to be applied. I propose using using static System.Query.Sequence; instead, in a way that is analogous to the...
Now that VB 2005 has released to manufacturing (RTMed in TLA-speak), we’ve updated our installer for the VB LINQ preview. You can find it here. I think the pages at http://msdn.microsoft.com/vbasic/future won’t be updated to point to it until next week because of other changes they’re making to that sub-site after RTM, but for now you can click directly on the link above. Feel free to get the word out! The actual bits are the same as the PDC release — no new functionality — but rest assured we’re also working on an updated release with more features in the...
You’ve probably seen this elsewhere, but… The PDC05 videos are now online and available to anyone who wants to watch them for (I believe) the next six months. You can catch my sessions there in case you missed the fun the first time around!
TLN308: Visual Basic: Future Directions in Language Innovation
PNL03: Scripting and Dynamic Languages on the CLR
PNL11: .NET Language Integrated Query End-to-End
Just announced, we’ve got an upcoming chat on the VB 9.0 language enhancements we’ve been talking about:
Visual Basic 9.0 Language EnhancementsDescription: Have you been hearing and reading about many of the exciting new features being planned for a future version of VB beyond the new version VB 2005? Would you like to get more details on what is planned for VB 9.0 directly from VB team members? Would you like to provide the VB team with feedback based on what you have seen coming in VB 9.0? Join the Visual Basic language design team to discuss some newly announced VB...
I notice that Darryl Taft has a very interesting article today over on eWeek asking “Will VB 9 Win Over the VB 6 Faithful?”. I think the headline is a bit off, since the real question is “Will VB 2005 Win Over the VB 6 Faithful?” given VB 9.0’s status as almost-entirely-vaporware at this point. The answer to that question is “yes, definitely, in my opinion,” but time will tell. Only once we know what happens with VB 2005 will we really be able to start talking about how VB 9.0 will or won’t change that new status quo.
There was one...
In one of the comments to the “Introducing LINQ” entry that I wrote, Unilynx wrote:
Sounds like what we've been doing for five years already :)
This was a comment that came up several times at the PDC from various sources: “What’s so revolutionary about this stuff? We’ve been doing this kind of thing for years!” On the one hand, what’s unique about LINQ is how it’s built, it’s openness and flexibility, and it’s unification of data querying across domains. But on the other hand, yeah, let’s be honest: as Newton would say, if we’re seeing further, it’s only because we’re...
Looks like Carl and Co. have put up a .NET Rocks show that Amanda, Erik and I recorded at the PDC. We had a very interesting discussion, ranging from LINQ to what it was like for Erik to be a “Head in a Box,” definitely something for everyone! Check it out!
I’ve been thinking about something Wes said last week about C# 3.0 and VB 9.0. After viewing my PDC presentation slides, he noted:
The difference in focus between the C# and VB team is becoming much more evident: The VB team is opting for greater relevance and convenience in the short term, while the C# team is trying to avoid creating long-term baggage.
I think this succinctly describes what’s going on in regards to VB’s embrace of XML integration into the language and C#’s cautiousness around it. If you talk to the C# team about this, you get some very explicit concerns about...
Over in the LINQ MSDN forums, the question came up: which is better, Select/From (as VB does it) or From/Select (as C# does it)? To quote from the thread, here’s the C# side of it, straight from Anders:
There are a multitude of reasons why select comes at the end and not the beginning of a query in C# 3.0. The more important ones are:(1) Statement completion (Cyrus' blog has a good explanation).(2) Order of execution. The C# query syntax lists operations in the order they are executed.(3) Scope of "from" variables. SQL is strange in that scope flows both upward...
While at the PDC, I also did a short video interview with F5 DevCentral. Check it out, even though the front image is kind of scary, in my opinion…
Tag: PDC05
During the PDC, I got to sit down with Jon Udell and Anders and do a quick podcast about LINQ and other stuff. Check it out.
Tag: PDC05
Two new videos, timed to coincide with the PDC are now up:
Paul Vick and Erik Meijer - Dynamic Programming in Visual Basic – This is me and Erik talking about dynamic stuff in VB. We were planning on talking about some of the new XML stuff as well, but didn’t even get to it! Another video, I’m sure…
Paul Vick and Amanda Silver - VB Language Futures – This is me and Amanda talking about a lot of the future stuff we talked about at the PDC. Check it out!
Hopefully more to come. If you have specific topics you’d like to...
FYI, Scott Swigart was nice enough to do an interview with myself, Amanda, Erik, Rob Copeland, Alan Griver and Jay Roxe about VB 9.0 for Dr. Dobb’s Journal. We even made the front (web)page! Check it out.
Now that I’m back, safe and sound, in Seattle, I can start to catch up on some of my blog backlog! So let’s start with the highlight of the trip, my talk. I was a little nervous about it, but the worried turned out to be for naught — the session went really well! Lots of people showed up and we had a good time talking about all the ideas we’ve been working on for VB 9.0.
I’m not sure what the plans are in terms of making slides available outside of the PDC. You can find a bunch of the...
Still not at a point to post more about how the session went (long story, short: very good), but I had a funny moment just a second ago. I was looking at the internal website that has speaker evaluation information to see how people liked the session. Pulled up the data and sorted it in Excel. Then I was thinking, “You know, I really want to filter out sessions that didn't get a lot of feedback reports because they might skew the data.” Since I'm not an Excel expert, the thought occured to me:
You know, I could just fire up...
Throughout this week and beyond, we’re going to be doing a lot of talking about Project LINQ, so I wanted to start with a relatively brief overview of what the project is, what its goals are, and how they apply to VB.
To start with, LINQ stands for “Language Integrated QUery.” LINQ fundamentally is about integrating query operations into the .NET platform in a comprehensive and open manner. It’s also about providing a unified way for you to query across any kind of data that you have in your program, whether it’s relational, objects or XML. This, we believe, will represent a tectonic shift in...
Today at the PDC, we’re launching “Project LINQ,” and it’s big. Really big. I mean, really, I wish I had the money to hire those guys who do the movie trailer voiceovers (and you know who I’m talking about):
In a world torn apart by incompatible conflicting and incompatible data domains, one company dared to stand up to the status quo. (Shots of scowling programmers looking at computer screens. One desperate programmer exclaims “We just can’t make it work!”) Doing what they said couldn’t be done, that company cut through the artificial barriers separating the world’s data, making querying relational data, object...
Today marks the beginning of one of the bigger experiments that I’ve been a part of during my 13 years at Microsoft. No, I don’t mean any of the new technologies that we’re going to start talking about today and through the week. The grand experiment that we’re beginning at this PDC is radically opening up the development process within the Visual Basic group (and the rest of our division) in ways that we’ve never attempted before. I’ve been through a bunch of product cycles up until this point, and it’s never been the case that we’ve been so prepared...