Friday, June 26, 2009

New JavaScript Implementation for the DLR

The Dynamic Language Runtime was announced at the same time as Silverlight. Along with IronPython and IronRuby a third, Silverlight only, language was announced that ran on the DLR.

This language was Managed JScript, an ECMA compliant version of Javascript that was touted as an easy way to port AJAX applications to run on Silverlight.

Unfortunately as IronPython and the DLR developed Managed JScript stagnated. It was only ever released as binaries and hasn't been kept up to date with recent versions of the DLR. Someone called it the Bastard, red-headed step-child in the DLR.

However, there is now an alternative implementation of JavaScript for the DLR:
RemObjects Script for .NET is an embeddable engine for .NET applications that allows developers to let their users introduce written scripts that influence the behavior of the application.

The RemObjects Script engine is built in a language-agnostic way, so that different concrete language implementations can be created on top. It currently supports most of ECMAScript 262 version 1.5 (also known as JavaScript). There are also plans to support Pascal Script.

It's based on the Microsoft DLR runtime for simplicity and ease of inter-operability with other dynamic languages and .NET 4.0 languages with support for dynamic operations, but can be run on any version of .NET 2.0 or later, as well as Mono.

Currently supported features:
  • Objects
  • Prototypes
  • Functions
  • Arrays
  • Booleans
  • Regular Expressions
  • Numbers
  • Build-in classes: Object, String, Function, Array, Number, RegExp, Date, Boolean
  • Interopability with non-ECMAScript types
  • Interopability with other DLR-based language types
ECMAScript is a dynamic language and is weakly typed. It uses a prototype based object model (no classes). It is a flexible language that due to its lack of types is ideal for scripting purposes. EMCAScript has a very simple model for object oriented programming, where objects are property bags with a "prototype" model to allow for a way of inheritance. It supports closures (nested functions) and every function is an object on it's own.

Note: RemObjects Script is in early development stages, and currently only available from its SVN source control repository at It is implemented using Delphi Prism and the Oxygene language.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.