Updated VB 9.0 (LINQ + XML) preview out!

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 some excellent work by another team member on variable capture, means a lot of stuff works now that didn’t before.
  • The editing/display experience for XML literals has been greatly enhanced — just having colorization makes a huge difference.
  • A bunch of extensions were made to the XLinq support to make working with namespaces and elements easier.

Amanda covers this in more detail in her entry, but this should give you a flavor. Eagle eyed readers will note that I said that I did a lot of work on “implementing lambda expressions,” but it’s important to realize that at this point lambda expressions are only used as a part of query comprehensions — there is no explicit syntax for lambda expressions yet. The priority was on getting the DLinq support working, and now that we’ve got that, we’re moving on to flushing out some of the remaining questions like lambdas…

Hope you enjoy!

Update 02/08/2006: I also forgot to mention that Amanda and I did a MSDN TV episode talking a bit about the new CTP.

10 thoughts on “Updated VB 9.0 (LINQ + XML) preview out!

  1. Karl [MVP]

    I know there are better places out there to discuss it, but I’m with the VB team on the (select/from)/(from/select) syntax and I hope the C# team change their mind.

    SELECT UnreadableCode

    FROM Class

    Where Instance IS Default

    😉

    Reply
  2. david

    I think you’re implementation of Intellisense highlights why you’ve made the wrong decision on the select/from ordering. It does work, after a fashion, but it feels really awkward…

    You type ‘Select’ SPACE TAB [type From var] SPACE TAB [in var] SPACE/TAB [cursor moves back to after ‘Select’ and you get intellisense dropdown] [type Select var] SPACE [more intellisense options for Order By/Where (which when selected move the cursor back to the end of the line, and insert the Order By or Where).

    This just isn’t intuitive, people coming to this for the 1st time will be confused by it…

    Would it be possible to have an ‘Option LINQ Select/From’ or something similar to change the ordering? this way it’s left up to individual companies how they wan’t to handle it.

    btw small bug… you get the Order By and Where in the intellisense list after you enter the Select or In statements, but you don’t get intelisense for Order By after the Where statement.

    Reply
    1. paulvick

      David: Thanks for the bug report, I’ll pass it along. As for ordering, we really want to choose a single ordering, otherwise you end up with code written both ways and no one really knows _how_ to read it. We’re collecting feedback on the CTP, so expect an update soon on our thinking…

      Reply
  3. Leigh Kendall

    I’m not sure if the intellisense / ordering is such a big deal; I use a SQL product now that provides great intellisense, and typically when I type SELECT statements now, I type select {hit enter} then define the rest of the statement (w/intellisense), when I’m done, I go back to select to complete the statement.

    I’ve adapted to this style well and when rereading sql statements, my focus is on what is being selected, not necessarily where, or if it is, it’s somewhat secondary.

    My $.02…

    Reply
  4. Dan Abramov

    I think that VB 9.0 syntax Select…From is much more comfortable to read and write than the C# syntax.

    By the way: what’s about lambda expressions support in VB?

    Reply
  5. John Whattam

    Hey Paul,

    Just finished viewing your video on the latest CTP for LINQ in VB.NET. Are there any plans to release the final code as an addin for existing VB2005 users or will the final release only be available as part of the next version of VB.NET?

    Regards,

    John.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *