Inside A DLR Language – IronJS
One of the things Fredrik emphasizes, is how much work is reduced by the DLR -
The DLR gives you a lot of really great stuff for free.
That (language interop) is one thing for sure, but also just how solid the DLR code is and how big of a piece of the technology it solves for you (emitting the IL)
Fredrik points out the two ways to use DLR – either use the associated binders or use the DLR as an IL generation and compiler tool and do your own binding. The first one being slower, IronJS uses the second option. As per the benchmarks published about an year ago, this is already faster than the IE8 engine.
The side-effect though, of doing your own binding, is that there is no out-of-the-box interoperability with other languages on the DLR.
The IronJS parser is currently written in F#, with the core runtime being in C#. In hopes of speeding it up further, Fredrik plans to replace all the F# code with C# in the next version of IronJS. However, he points out in his interview with Scott Hanselmann - being built on the CLR means that sooner or later, IronJS will hit a performance wall, compared to something like V8 that’s built on native code.
If you want to start implementing your own language on the DLR, a great place to start is the documentation. You could also read the source code of one of the “Iron” languages, such as IronPython or IronRuby.
Stephanie Davis (nee Stewart) Dec 21, 2014