Robert Jan - Monday, October 27, 2008 - 11:58 PM

This was a popular session, so I went a bit early to get a good seat.
Of course, lots of people want to here what Anders Hejlsberg had to say about C# 4.0

image

He showed the evolution of C# in time :

image

And then showed the new language innovations of C# 4.0:

image

There will be a DLR capable of using a vast set of binders :

image

Now, when you have to dynamically invoke a method at run-time, you have to do all sorts of nasty code which can be different for each target (C# object, Javascript object).

The new dynamic keyword, statically types a variable to be dynamic. This way, the DLR will kick in, and do dynamic method invocation and convert the result dynamically.

image

Some more examples:
If you dynamically type the result of a Math.Abs call, the DLR will choose the correct overload at run time

image

Another new feature in C# 4.0 is named and optional parameters:

image

 

 

 

 


AND improved COM interop:

image

(No more Missings..)

AND some changes in Co- contra variance of generics:

image 

image

image

Anders concluded his talk, with a glimpse of the future. He’s showed a preview of a managed c# compiler which should allow Meta data programming, a language model, DSL embedding and dynamic eval of code:

image

He gave a funny demo of this with a self-written C# command line tool which evaluates code and runs it :

image


Posted in: PDC 2008  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Page List

    Calendar

    «  September 2010  »
    MoTuWeThFrSaSu
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910
    View posts in large calendar

    Recent Comments

    Feedburner Statistics 9/8/2010
    23 Readers ~ 58 hits ~ 0 reach

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010 Inwit.nl