Cook Computing

Scheme and Continuations

January 30, 2003 Written by Charles Cook

Following my discovery of continuations a few days ago I've downloaded and installed DrScheme as a tool for investigating them. Scheme seems to be the most well-known language which supports continuations and DrScheme provides a good environment for learning the language. I've not got much spare time at the moment but I'm trying to fit in at least half an hour a day on this.

As far as continuations are concerned, I've not quite reached the point where they are instinctively obvious but they are beginning to make sense and I can write simple Scheme functions which use them. I'm planning to write up a simple explanation here but the potential problem with this is illustrated by the fact that the "simple" explanations which I've read over the last few days now really do seem straightforward whereas to begin with they were definitely not!

The only Scheme compiler I've come across for .NET is Pinku Surana's HotDog compiler. Judging from the web page this is still a work-in-progress, even though I remember it being one of the language implementations hyped up to illustrate the multi-language paradigm of .NET at the 2000 PDC (I remember attending a breakout session by Pinku).

I very belatedly came across an interesting article today called One Runtime to Bind Them All. I don't know how I missed this a year ago, particularly because there was a Slashdot thread on it. The url gives the game away to some extent but this is an updated version of the article with comments from Erik Meijer, Program Manager for the CLR at Microsoft, to provide a different perspective on some of the points raised. I agree with the gist of the article that the CLR as it currently stands is designed for languages such as C#. As the article describes, there is no support for programming language features such as closures, continuations, and tagged data types. Of course, these can all be implemented in IL but at the cost of a big performance hit. However Meijer does hint we want to keep innovating the runtime to better support non-standard languages and already new features such as generics have been announced for a future release. Maybe IL will be also extended in ways such as prototyped by ILX.