This article is about dynamic programming languages on the Common Language Runtime. The article is based on another article I have written 2 years ago. (Read notes: bottom)
There are a lot of compilers out there and the number is increasing. This has been very interesting in the last few years because of the development frameworks, which has removed the borders between machine architectures. One of these frameworks is the .NET Framework, which is Microsoft’s own competitor to other frameworks like the Java Platform. The .NET Framework was designed to support multiple languages and let them co-exist as equal languages on the same platform sharing the same class and runtime library.
However the Common Language Runtime (CLR) is build for statically typed languages only and dynamic languages can not run directly on the CLR. Now Microsoft has taken the next big step by developing a framework that makes this possible. I am talking about the Dynamic Language Runtime, which is becoming a part of .NET Framework 4.0 upon its release next year (2010).
Dynamic Language Runtime
The Dynamic Language Runtime (DLR) is not a runtime in the same sense as CLR. It is a library much like the rest of the Framework Class Library (FCL).
The DLR provides functionality that carries out dynamic dispatch at runtime as well as making it easy for the existing statically typed programming languages to interoperate with dynamically typed ones.
The DLR and the languages on it is not strictly bound to .NET Framework and can be used with Mono too. The language teams are making sure that they are compatible with both.
I have previously written another article which I strongly suggest that you read it if you are interested in the DLR. It can be found here.
Web development
Web development is one thing that the dynamic programming languages are suitable for. With dynamic languages web applications can be developed quickly by testing as you write it. Dynamic languages are good scripting languages because you do not think of types as you do in statically typed languages. That may be the reason many people, especially hobbyists, start with learning a dynamic scripting language. PHP is one of, or maybe the most popular one.
Not to forget that ASP.NET and Silverlight can integrate the DLR and use any language upon it.
Programming languages
Here is a short introduction of each of the major dynamic programming languages that are targeted for the CLR.
One common thing for all languages is that they want to be compatible with the official implementation as well the .NET Framework.
IronPython
IronRuby is the official Python implementation for the DLR. It implements the language compiler as well as an interpreter and the Python libraries.
The DLR allows IronPython to bind to other languages, both managed CLI-languages and unmanaged native languages. Among those CPython, Ruby, JavaScript and Silverlight.
The project was started by Jim Hugunin who also created Jython (formerly JPython) on the Java Platform. The reason he created and Python implementation for the CLR was that he had heard that .NET was a bad platform to implement dynamic programming languages on. This was proven wrong. Hugunin later joined Microsoft and created the DLR from what he had learned from his previous experience. The DLR has since then been a dependant on the IronPython project at Microsoft which he still leads.
The prefix “Iron” is said to be taken from tales where the word and metal has a powerful, somewhat magical meaning.
IronRuby
IronRuby is a implementation of the Ruby programming language developed at Microsoft with the same goals as IronPython.
It was started by John Lam as RubyCLR, a Ruby binder for the CLR, and has since then evolved into a full language implementation for the DLR. Lam now works as the leader for the IronRuby team at Microsoft.
Phalanger
Phalanger (PHP Language Compiler) is an implementation of PHP which runs on the CLR. It compiles PHP code into .NET assemblies. The project is also supported by Microsoft.
The primary goal of Phalanger is to close the gap between PHP and .NET. It aims to be fully compatible with PHP all down to the runtime libraries and at the same time be compatible with the .NET Framework.
It is completely different from the other dynamic languages because it has its own runtime library and is not dependant on the DLR. Despite of that the platforms can interoperate and take advantage of each other.
The project was started by Tomas Matousek, a former student at the Charles University in Prague, in the Czech Republic. Matousek has left the project and is now working as a developer in the IronPython team at Microsoft.
Phalanger is dependant on its community.
Notes:
This is partly a re-written version of an article with the same name. Some parts are copied from the older one and changed to fit in the current one.
Recent Comments