21st Century Smalltalk

May 7, 2007

Languages, Libraries, Tools and Runtimes

Filed under: General — pfisk @ 4:26 pm

There are some general themes that permeate the debates about the relative merits of different programming languages. If <A> and <B> are any arbitrary languages, then most arguments take the following form:

  1. language <A> is faster than language <B>
  2. language <A> runs on more platforms than language <B>
  3. language <A> has better programming tools than language <B>
  4. language <A> has more extensive libraries than language <B>
  5. language <A> is more popular than language <B>

With more languages being ported to .Net and the DLR, the next few years may finally provide a “level playing field” where several programming languages can be compared in applications development.

  1. I expect that all dynamic languages running on the DLR will be similar in speed. Language implementations not using the DLR will probably show more variation depending upon details of each compiler.
  2. Platform portability will be exactly the same for all languages for any specific version of the .Net runtime.
  3. Visual Studio is being widely used across languages for Windows desktop development. Silverlight/DLR based IDE’s will become available for multi-language scripting development in non-Windows environments.
  4. Libraries in any language are available to any other language sharing the platform. For example, Ruby can access Python libraries (and vice versa) and both can access C# libraries.
  5. Developers can choose whatever language they are already comfortable with.

So the “language wars” are likely to become a thing of the past, at least for applications running on the .Net/Mono platforms.

It will be interesting to see how Smalltalk and Lisp are used in implementing the next generation of applications. Smalltalk’s has the virtue of interactivity and simplicity of learning (children, occasional users) while Lisp is unique in its ability to transmute data into code and code into data.

They both may contribute unique solutions to new challenges.

Smalltalk DLR Compiler

Filed under: .Net Architecture, Vista Smalltalk — pfisk @ 2:50 pm

I have built a Smalltalk compiler for the DLR (Dynamic Language Runtime) which is currently capable of processing arithmetic expressions. Smalltalk is structurally a very simple language, and I estimate that the compiler could be completed within one to two weeks.

The DLR has elegant solutions to several problems that I had encountered when building dynamic languages for the CLR (Common Language Runtime). Jim Hugunin has posted an excellent series called “The One True Object” which explains the difficulties, and then how the DLR architecture succeeds in providing a fast and consistent foundation for multiple languages.

At this point, I am starting to feel comfortable with using the DLR, although I still don’t fully understand how the magic is achieved. Even in its current alpha state, it is considerably better than any of the solutions that I (or AFIK, anybody else) have developed. It appears to finally be the “missing link” needed to enable scripting across the range of .Net platforms.

Blog at WordPress.com.