E is a <deep breath> cross-platform scripting language with capabilities-based security and builtin support for distributed programming. It's called E because, while there are languages called A, B, and C, there is none called D; thus, the original designers decided that D must be bad luck, and moved on to E. The current implementation is written in Java, and comes with ELib, which lets Java programs interact and cooperate with ones written in E. It is closely related to the CapIDL and EROS projects, among several others, and is worked on by some very smart people.

I'm not going to even try to explain most of the language in this writeup; instead I'm going to explain a few core concepts which will hopefully get some few of you interested enough to learn the language.

One of the neat things about E is it's mechanisms for deadlock-free distributed programming, which are inspired by real life. Let's say that you have to get a document from Bob over in accounting. You walk over and find that Bob hasn't finished it yet, so what to do? In many distributed systems, you would stand there and wait for him to finish it (block). Instead, of course, you tell him you'll be back later, and go do something else. This is how E works.

The key operation is the 'eventually operator', which is <-. To tell a car object to move, you might say:


car <- moveToHere(5,7)
// The car will eventually move, but not right now.

But we don't even have to have an actual thing to make calls on with the eventually operator. We can do that just based on the promise that, at some point in the future, we will have the appropriate object:


// carVow is a promise that the car maker will send us a car
def carVow := makeCar <- ("Skyline")
// once we get the car, tell it to move
carVow <- moveTo(2,3)
// but we keep going, even if the car isn't built yet

You can also call in on a promise, waiting until something really is done:


when (carVow) -> done(car) {
   println("Right on, we've got wheels!")
   car <- goTo("The 7-11")
} catch(prob) {
   // Something bad happened, and now we don't get our car
   println("Dude, where's my car? Answer: " + prob)
}

It's impossible for me to write too much more without just replicating everything in E in a Walnut, so I will direct you there for all further information, including the 'normal' programming stuff for single process systems. E really is cool; check it out.

† Alas, StrawberryFrog informs me that there is a programming language named D (http://www.digitalmars.com/d/). In defence of both myself and the E programming team, E existed before D. :P

‡ Most examples either stolen from or heavily inspired by ones in E in a Walnut.

References: