archives

The Last Language?

In the last few years we've seen a return to languages that were invented in the '50, '60s, and '70s. Clojure, Scala, F#, and even Ruby are derivatives of much older languages, and do not represent new ideas. This begs an important question: Have we explored the language space? This question is not nearly so absurd as it sounds. We may, indeed, have completely explored all the different types of computer languages. It may well be that any new language invented will simply be a minor improvement of an older concept. In this talk, Uncle Bob Martin asks if perhaps it's time we stopped exploring that space, and simply picked "The Last Programming Language". What would that language we like? What attributes should it have? And is this idea wise?

Implementor's guide/tutorial to delimited continuations?

Is there are really simple tutorial on implementing a language with delimited continuations?

E.g. this is how you represent stack frames, this is how you capture a continuation, etc.

Something like this, but complete:

when a continuation is captured a chain of exceptions gets propagated up the stack. At each "stop" on the way up the stack, an exception handler cons-es up a closure which will continue the function whose frame is active at that point. When the exception reaches the top level of the stack, the frames are packaged up as the continuation. Activating the continuation simply calls the closures in order to resume the saved computation where it left off. All the implementation needs to provide is some way to unwind the stack, stopping at each frame along the way. In C, it would be a longjmp/setjmp; in Java it would be catch/throw; in .NET catch/throw.

Thanks.

[Edit: I realized that something like A Monadic Framework for Delimited Continuations is probably the closest thing to what I'm looking for.]

Levy: a Toy Call-by-Push-Value Language

Andrej Bauer's blog contains the PL Zoo project. In particular, the Levy language, a toy implementation of Paul Levy's CBPV in OCaml.

If you're curious about CBPV, this implementation might be a nice accompaniment to the book, or simply a hands on way to check it out.

It looks like an implementation of CBPV without sum and product types, with complex values, and without effects. I guess a more hands-on way to get to grips with CBPV would be to implement any of these missing features.

The posts are are 3 years old, but I've only just noticed them. The PL Zoo project was briefly mentioned here.