Monday, May 08, 2006

DLinq: VB 9 Throws in the Towel on Select/From

Paul Vick's May 5, 2006 post, "Select/From vs. From/Select revisited..." post reveals that the Visual Studio Orcas release's Visual Basic 9 syntax for DLinq queries will adopt "Yoda style" From ... Select sequence similar to that of C# 3.0:

Dim WACusts = _
   From c In Customers _
   Where c.State = "WA" _
   Select c
rather than the conventional SQL Select ... From order:
Dim WACusts = _
   Select c _
   From c In Customers _
   Where c.State = "WA"
The obvious reason for the change is the need to support IntelliSense for statement completion. Reader response in comments to the post is favorable so far.

Use of the SELECT ... FROM ... WHERE sequence in SQL has always seemed strange to me, because the query processor must identify the source table(s) before validating the query's field list. However, I'm not sanguine about the proposed From ... Where ... Select order. It seems to me that From ... Select ... Where is more in tune with VB's traditional reputation for readability.

Paul mentioned a forthcoming VB LINQ CTP but didn't provide an estimated drop date.

P.S.: The Irish National Developer's Conference included a session on May 4, 2006 entitled "LINQ the future of handling database queries and XML in .NET" by Mark Lawrence.

Technorati Tags: , , , , , ,