A tour round the next versions of these developer tools
At Microsoft’s Tech-Ed conference in November 2006, the sessions attracting the biggest crowds were those given by Anders Hejlsberg, the lead architect of C#.
He was talking about C# 3.0, the next iteration of the language, which is set for release along with the next version of Visual Studio codenamed Orcas, possibly late in 2007.
C# 3.0 is not to be confused with .Net Framework 3.0. The latter is a large extension to the framework library, including XAML for XML-defined user interfaces and WCF (Windows Communication Foundation) for inter-process or remote communications. The .Net Framework 3.0 runs on version 2.0 of the .Net runtime and is mostly written in C# 2.0.
C# 3.0 introduces Language Integrated Query (Linq), which makes database access part of the language itself.
“We have these incredibly advanced and powerful general-purpose programming languages and databases, and then we have incredibly unadvanced APIs that go between these two worlds. You put queries in strings, all the types go away, and you’ve got to cast each column from a DataReader. There’s a lot of need there for something better,” Hejlsberg said.
Here is a small snippet of Linq from one of Hejlsberg’s sessions:
Northwind db = new Northwind(…);
var contacts =
from c in db.Customers
where c.City == “London”
select new {c.Name, c.Phone};
Language integration means that the query results, contacts in this example, are in a collection variable that you can step through using foreach. Linq is n ot reserved for C#, and Visual Basic 9.0 will have a similar feature.
Under the covers, Linq makes heavy use of generic types, implemented in C# 2.0, along with lambda expressions, in which functions are treated as first-class objects. Hejlsberg says that C# 3.0 borrows ideas from other less well-known languages including Lisp and ML, both of which are classified as functional languages because they emphasise functions rather than a series of commands.
C# 3.0 will be binary-compatible with .Net 2.0. In other words, the changes are at the language and compiler level, not in the .Net runtime itself. “There has been no need to make changes,” said Heljsberg. “The big change that we needed was generics.”
Related articles
Q.How do I store musician and other information about...
Q.Why can't my browser find the website address I typed...
Q.All updates have been downloaded, so why won't Windows...
Basic Input Output System. Essential software built into every PC that connects the vital components....
|
|
|
|
|
Nikon Coolpix S570 BlackPrice: £66.99 |
Computeractive Ultimate Guide - Storage, Sharing & BackupPrice: £5.99 |
Back Issue CD-Rom 13 (2010)Price: £9.99 |
Hallmark Card Studio DeluxePrice: £15.31 |
Marine AquariumPrice: £15.41 |