Reading about how dynamic is implemented in C# 4.0 over on Sam Ng's blog: Dynamic in C#
How did they implement the new dynamic 'keyword' in C# 4.0? Using the DLR, of course!
Very cool to see that the C# version of dynamic dispatch is implemented over the same mechanisms for call actions, dynamic objects and binders to generate expression trees, with some C# specifics in the binder to implement C#'s rules for dispatch etc.
It's interesting to see the flow-on effects of using a dynamic type in an expression and how the 'dynamism' then flows on to subsequent expressions or invocations involving the resulting object.
Quite a nice bit of work, and well explained by Sam. He's going to post more in the series, so worth subscribing to his blog.
Kirk