OS Jam at Google London: C# 4 and the DLR

Jon Skeet, author of the well regarded C# in depth, did a five minute talk on C# 4.0 and the Dynamic Language Runtime at a recent Google Open Source Jam in London. The 'innovative' slides are online, and they touch on details like the dynamic keyword, binders and IDynamicMetaObjectProvider.
The fundamental point of the DLR is to handle call sites - decide what to do dynamically with little bits of code. Oh, and do it quickly. That's what the caches are for. They're really clever - particularly the L0 cache which compiles rules (about the context in which a particular decision is valid) into IL via dynamic methods. Awesome stuff.
I'm sure the DLR does many other snazzy things, but this feels like it's the core part of it.

At execution time, the relevant binder is used to work out what a call site should actually do. Unless, that is, the call has a target which implements the shadowy IDynamicMetaObjectProvider interface (winner of "biggest mouthful of a type name" prize, 2009) - in which case, the object is asked to handle the call. Who knows what it will do?

Comments

Popular posts from this blog

Extending Abobe Flash Player and AIR with Python and Ruby

IronPython Tools for Visual Studio CTP3

Further Adventures of the Debugger