Simple clear advice in plain English

Hands on: The future of C# and Delphi

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.”

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Google apps creating a new email address screenshot

Personalise your email address

We show you how you to get an email address that really says something about you and your family. But first you've got to buy a domain name to get started

Hands on: Master the Office 2007 Ribbon

How to make your macros work with Office 2007

Hands on: The latest Delphi software

New Delphi releases have been spoilt by hasty shipping

Question & Answer

Q.How do I store musician and other information about...

> Read the answer

Q.Why can't my browser find the website address I typed...

> Read the answer

Q.All updates have been downloaded, so why won't Windows...

> Read the answer

Best deals on the web

img

THREE E585 Mi-Fi Take it Away Mobile Broadband - 5GB allowance

£44.97- Buy it now

img

T-MOBILE 3G Pay As You Go iPad Micro SIM

£0.10- Buy it now

img

THREE Huawei E353u Take It Away Mobile Broadband - One Month Rolling Contract

£4.99- Buy it now

Great benefits for subscribers!

Poll

Which is your preferred web browser

Jargon Buster

Computing terms explained in plain English

Bios

Basic Input Output System. Essential software built into every PC that connects the vital components....

Great shopping deals from Computeractive