The Future of C# (TL16)- Anders Hejlsberg - Ahmed Salijee

Ahmed Salijee

The Future of C# (TL16)- Anders Hejlsberg

This session can be broken down into 3 parts. In part 1, which is the first 15 minutes, Anders describes the history of C# and some of the key trends that are defining the future. C# v1 was focused on managed code, v2 put the stuff they did not have time to put in v1. v3 was the first time they could think deeply about addressing new features with LINQ and some degree of functional programming. 

Anders than focused on 3 major trends vi declarative programming, dynamic programming and concurrent/multicore. Several references made to C# co-evolving with VB as well C# borrowing from other languages and becoming multi paradigm. That is supporting more than one programming style.

 

The second and major focus of the session was around the new features of C# v4. These areas are dynamically typed objects, optional and named paramaters, improved COM interop and finally co and contra variance.  C# (as well as VB) will become languages that directly support the DLR. More information on these areas can be obtained by looking at the demo descriptions below.

The final area was a look at the futures beyond v4. The major focus area was to take the compiler and expose it as a service that could then be extended and re-used by developers.

 

List of demos
Dynamic Keyword

Calling into Javascript and Python A Silverlight demo that starts off showing C# can call into Javascript (normal SL2 feature). Show how we can replace the calls to .Invoke to direct method calls after making use of dynamic features.
Also shows how you can take existing Javascript code and code it to c# a bit more easily now that dynamic objects are supported.
Finally a demo showing how C# can call into Python code.

Implementing IDynamicObject

A demo that shows a dynamic property bag that implements IDynamicObject. Shows howto create properties on the fly - In effect how it does dispatching or “duct typing”.  Approx 35 mins into session

Improved COM

An Office based demo that shows taking some data on running processes, putting into Excel, creating a graph and putting the result into Word. Shows how much easier it is now that you do not have to worry about explicit casts. Also support for optional and named parameters means that the code looks a lot more like it was intended (the VBA type syntax). No need to Type.Missing! Approx 47 mins into session

Compiler as a Service

A demo showing some futures beyond C# v4. The compiler is in managed code and get exposed. In this demo, we see a command line type application that takes code which is than dynamically executed aka an Eval function. Showed off to  This was probably the demo that got people most excited. Approx 1 hour into session

If you are a C# or .NET developer, you definitely want to check this session out. The new features will make for interesting scenarios and certainly a lot easier COM Interop.