|IronJS - In Conversation with Fredrik Holmström|
|Written by Nikos Vaggalis|
|Wednesday, 11 July 2012|
Page 2 of 2
NV: How is the AST transformed into the DLR tree?
FH: You walk over the AST with a function that has the signature "IronJS.Ast -> System.Linq.Expressions.Expression". It basically transforms the internal AST nodes into the equivalent DLR ones.
NV: Is System.Linq.Expressions a subset of DRL expressions?
FH: It's a superset, or rather an evolution, of the 3.5 version.
NV: So they can represent a full fledged language with statement lambdas?
NV: I thought that this could happen only with .NET 4?
FH: If you run IronJS on a pre-4.0 version then you need to include the proper assemblies which can be downloaded and compiled from dlr.codeplex.com and all the same types will exist as in 4.0, just under a different namespace.
NV: I see. So what can a developer do with IronJS? Use the Windows GUI libraries, manipulate the XML DOM easier?
FH: IronJS itself doesn’t really come with a pre-defined use-case, I would say that anywhere you would like users of your application to be able to do their own scripting.
I know of a few people that have used it together with ASP.NET/MVC to both create view templates and some sort of ".net-nodejs-hybrid".
NV: Very interesting. Can you also control the browser through Silverlight ?
FH: Currently, no, there are a few low level things IronJS does which are not allowed in SL.
NV: Will IronJS for the browser be more safe since it would load on top of Silverlight which acts as a sandbox virtual environment and has the same restriction as the .NET VM? Would it make XSS attacks a thing of the past?
FH: IronJS uses the .NET GC.
NV: Can LINQ be used from IronJS? And what doors would such a possibility open? Like IronJStoSQL?
FH: It cannot, sadly.
NV: But if it could,what would that mean?
NV: Performance wise are the static CLR languages faster than their DL counterparts?
FH: Yes they are faster, no doubt.
NV: The initial parsing was through F#, but now you've changed to C#,why is that?
FH: The parsing is still in F#, it's the core runtime classes that represent the JS environment that has been moved to C#. This was done by John Gietzen who contributed a lot of code and it was done because it's easier for other people to inter-op with them.
NV: So last question......are you aware of Parrot VM?
FH: Yes, I am.
FH: Honestly my contact with Microsoft and the trust in the quality of the code the DLR team put out. Also the DLR had been proven with IronRuby and IronPython. Nothing bad against Parrot though, as I have never even spoken to them.
or email your comment to: email@example.com
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
|Last Updated ( Wednesday, 31 October 2012 )|