This post originated from an RSS feed registered with .NET Buzz
by Paul Vick.
Original Post: Select/From vs. From/Select revisited...
Feed Title: Panopticon Central
Feed URL: /error.aspx?aspxerrorpath=/rss.aspx
Feed Description: a blog on Visual Basic, .NET and other stuff
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 = _
Select c _
From c In Customers _
Where c.State = "WA"
You can review the arguments for and against in my original Select/From blog entry, but the salient point is and always has been my comment that:
Statement completion is a significant question. We have a bunch of ideas as to how we could finesse this in the IDE, but we haven't reached a point of being really able to try them out. This may be a real sticking point, time is just going to tell.
And, indeed, this was the sticking point. Many of you tried out the Intellisense support we shipped in the last CTP and found it wanting. We looked at the other options available to us and came to the conclusion that it just wasn’t going to work any of the other ways we could think of, either. So, having concluded that we did our best to get the syntax we wanted, we switched to From/Select so that we could give the Intellisense experience that we think is even more important.