Tcl HomeTcl Home Hosted by
ActiveState

Google SiteSearch

Tcl'2006 Abstract: The L programming language

13th Annual Tcl/Tk Conference

Main Registration Schedule Tutorials Info

October 9-13, 2006
Holiday Inn Select
Naperville, Illinois USA

Important Information
Abstracts and proposals due June 30, 2006
Notification to authors July 31, 2006
Author materials due September 30, 2006
Tutorials start October 9, 2006
Conference starts October 11, 2006
Email Contact [email protected]

We are pleased to announce the 13th Annual Tcl/Tk conference (Tcl'2006), sponsored by Noumena Corporation , Digital Smarties , Eolas Technologies and ActiveState .

The L programming language

Author: Larry McVoy

Abstract

As the Tcl/Tk community knows, we use Tcl/Tk for our GUIs at BitMover. What may not be as well known is that we easily spend 10x more time reading code than we spend writing it. At BitMover, writing is easy, reading is hard. Anything we can do to make reading easier pays off with a 10x multiplier.

We have a love/hate relationship with Tcl/Tk. We love what we can do with the language, it's amazingly powerful. Far more powerful than any simple language like C. On the other hand, it's hard for humans (well some humans) to parse.

We spent some amount of effort trying to get the Tcl language to evolve to be something that us mere mortals could read. I'm here to tell you that that was a mistake. Messing about with Tcl is just a mistake, if you want to make it simple you lose the power. We finally realized that. Tcl is cool, it's just fine where it is and we should leave it alone.

None the less, we wanted something that mere mortals could write and (more importantly) read. So how do we do that? Well, we realized that Tcl is really a runtime plus a byte code interpreter. The runtime is cool, we like that. And the byte code interpreter gave us an out. We're a bunch of C programmers. What if we were to add to Tcl a way to type C like code and have that be compiled to Tcl byte codes? And what if we insisted that the C like code (which we call L) obey all the Tcl calling conventions and Tcl variables? Could we have a system where you could mix and match Tcl code and C like L code, having them call each other and not know the difference?

The answer is yes, we've done that, and this paper is about how we did it and what it looks like. It looks a lot like:

  • C
  • + associative arrays (we call them hashes)
  • + garbage collect strings (gotta love that)
  • + regular expressions

We'll demo what we have and listen to suggestions as to how it ought to be evolved. The code is open source under the same license as tcl. We'll maintain tcl/tk distributions for pretty much all platforms (a superset of what ActiveState maintains) so people can play without having to recompile.

While our goal of this work was to get to a language that we could use for major projects (>100K lines), the ideal answer is that this brings more people to the Tcl/Tk community.

--- lm at bitmover.com http://www.bitkeeper.com