The Functional Future of C#?
Steve Maine wonders about the uptake of new features in C# 3.0 that could allow certain more Ruby-like constructs.
I absolutely think people will take advantage of the new functional and dynamic features available in C#. However, I don’t think we’ll see the same fevered enthusiasm surrounding these features as one sees in the Ruby community. C# carries with it the baggage of its past, including styles, idioms, practices, and methodologies, many of which speak against the dangers brought on by features like extension methods. New languages, on the other hand, bring not only their new features, but also freedom from historical baggage and traditional strictures. The vast majority of programmers first saw Ruby in the light of Rails, so there was no change for anyone to resist.
In the case of .NET, I think we may see the most radical uses of new CLR features gain popular acceptance in languages other than C#. In particular, I’m thinking of the recent example of the DLR console showing the willy nilly mixing of dynamic languages. That level of interoperation will make it very appealing to segregate sections of code by style — style which will be indicated and supported by language choice. In this manner, initial exploitation of functional constructs and looser typing can happen in languages that breath that stuff, and the techniques that prove most popular will likely filter into common C# usage more slowly.