I just got chance to watch Anders Hejlsberg’s PDC2008 session talk - “The Future of C#”. I’m so excited about some of the changes in future C# 4.0. The demos are also so impressive.
- Dynamically Typed Objects: This is really cool even the concept has been already there in JavaScript, Python etc. You know, C# is always a strong-typed language. But C# 4.0 is gonna introduce “Dynamic”. Whenever you want to use an object whether it is COM, JavaScript or anything, you just need to declare that object as “Dynamic”. Then the run-time environment will automatically bind to that object. No complicate wrapper codes needed any more. So does that mean I can declare everything as “Dynamic” and let it run? Cool…
- Optional and Named Parameters: The pain in the neck with the Office integration will be gone forever. Those Type.missing matrix won’t show any more. We can dance with C# 4.0….
- Compiler as Service: This feature is really fascinating. Anders’ demo means we can have another powerful shell – maybe call it “C# Shell”. Basically you can do whatever you want to do with this “C# Shell” since you can write any code to just run it, isn’t that cool? I think it absolutely is.