Sjoerd Visscher's weblog

My ideas about new web technology that can change the future of the world wide web.

Last Update

12/8/2002; 2:56:55 AM

Weblog Search

Don't like the look of this site?

XML coffee mug
Click to see the XML version of this web page.

Updated with

Click here to visit the Radio UserLand website.

Thursday, November 07, 2002

Loell, a new programming language

When Dan Shappir and I were working on Beyond JS we agreed that Javascript is a powerful language. But we couldn't do all the tricks we wanted to do. One problem is the lack of control over the scope. And to keep the story short, I have created a language that gives full controle over scope: Loell.

Traditional languages either have static or dynamic scoping. With Loell you can have both. When a closure is created, the scope it is created in is stored in the scope property of the closure. When you use that scope when evaluating the closure (closure.scope#closure) you have static scoping. But when you use the current scope ($#closure) you get dynamic scoping. But you can use any object as scope.

It turns out that this is powerful enough to implement if, while the language has no actual branching built in. Even while is implementable which I had never anticipated.

I've got the parser running for just 3 days now, so Loell is nowhere near finished. There's no precedence and it's slow, but if you are interested in programming languages I hope you'll like to experiment with Loell already. If you know other languages that have special scope control, or research in scope control, I'd like to hear from you.