BT

Inside A DLR Language – IronJS

by Roopesh Shenoy on Jul 23, 2012 |

IronJS is a ECMAScript 3.0 implementation on the DLR. In a recent interview on i-programmer, IronJS creator Fredrik Holmström goes into the details of implementing a language on top of DLR.

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

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT