.NET 3.0 spec released
Microsoft detailed the future direction of C# today with the release of information about its LINQ project and the C# 3.0 draft specification.
LINQ stands for Language INtegrated Query, and is a set of extensions to the C# language which allow SQL-type capabilities to be integrated into the language itself.
In addition, the C# 3.0 spec details a continued development of the C# language, with many new features appropriated from various programming paradigms, and some completely novel ones too.



September 13th, 2005 at 8:39 pm
Very interesting how they wove together the Query syntax with Extension methods yet provided them as distinct language features, usable in other contexts.
September 14th, 2005 at 8:28 pm
So I was looking at extension methods and scratching my head a little.
I realized that these things provide for, amongst other things, default methods for interfaces. Depending on how the method lookups are done, Im assuming that a class method with a given name and signature takes precedence over an extension method with the same mathod name and signature.
For example, say we wanted to give IEnumerable a set of methods, theres no way to do that in C# 1.1 or 2.0. In 3.0 you can use extension methods, and every class derived from IEnumerable will acquire them.
Consider this:
class IEnumerableExtensions
{
public static IEnumerable Join(this IEnumerable a, IEnumerable b)
{
foreach (var x in a) yield return x;
foreach (var x in b) yield return x;
}
}
With this extension method, every instance of class that implements IEnumerable now gets a Join() method for free. Sweet!
I wonder if you can define extension methods for operators?
September 14th, 2005 at 8:30 pm
I wonder what the sociology behind it is.
Is it that the C# development team at MS think that functional programming is cool and want to include it?
Is it that C# is being seen as a real language and attracting experienced developers from other languages, who are demanding these language features?
Is it that languages like ruby and python are seeping into the larger programming consciousness and informing this shift?
September 14th, 2005 at 8:41 pm
I think that everyone who goes through a truly academic degree gets some exposure to functional programming these days, where in the past it would have been to languages like lisp or prolog.
So, I dont think they are including functional feature because they are cool, but rather because they are familiar and productive.
Whats interesting is that these features are being added to the langauge with minimal changes to the virtual machine. Mostly the features are syntactic sugar, or simple code transformations. Note that truly dynamic coding practices such as multimethods are missing, though ive read that VB.NET is introducing duck typing.
September 15th, 2005 at 2:48 pm
The blog “Cyrus’ Blather” has a helpful overview of C# 3.0