In his keynote, Guy Steele spoke about a new language he’s developing at Sun called Fortress (official site at The research is part of DARPA’s High Productivity Computer Systems initiative.

Growing a Language
Guy Steele gave a famous talk at OOPSLA ’98 entitled, Growing a Language, and applied this philosophy to Fortress. Languages evolve over time. We should expect mistakes and plan for warts. Thus, said Steele, we need a lightweight corrective system — replaceable components with some kind of built-in version control (Note: it was unclear if Fortress had realized this vision). He stressed a desire to avoid a monolithic standard library. “It would be great if there were a dozen implementations of complex numbers.”

Keep it Simple
Part of the design philosophy behind Fortress has been to keep the core language small. Steele and team frequently ask themselves, “Can this be done in a library?”

Fortress is really a framework for alternate language designs. The language itself has as few primitive types as possible. It has binary types of various sizes, as well as linear sequences (fixed static length), and heap sequences (size known at allocation time).

The type system makes aggressive use of inference to reduce clutter. It also provides first-class support for traits. For example, the integer types exhibit the trait CommutativeRing (which guarantees associative addition, enabling parallel reductions). Also they have a TotalOrder trait which enables static checking of sorts, etc.

Steele noted that “This may seem like theoretician’s overkill”, but suggested that much of it would be hidden in the libraries.

In order to build a programming language for scientific programmers, Steele and his team spent time watching them at the white board. To what extent could they take what people scribble as pseudo-code and make it syntax?” As an experiment, they asked, “Why don’t we retry the experiment of using math notation as the programming language?”

These experiments failed in the 60s, but Steele suggests this was due to primitive input and output devices. With today’s widespread support for Unicode, there is now a standard encoding for most of the math characters. We also now have high resolution displays, printers, etc.

Still, it’s challenging to parse this type of syntax — whitespace tends to be important. Also, concepts like scope and binding are not well addressed in math notation. The Fortress team didn’t want to fall into the trap of assuming that standard math notation could explain everything.

There is support for integers, floats, rationals — all with physical units. Fonts matter (italics, roman, bold, double-struck), and adhere to standard mathematical conventions. There is also an ASCII, wiki-style markup for the Unicode impaired.

Almost any symbol can be an infix, prefix and/or postfix operator. Juxtaposition (no symbol) is a binary operator, and can be used for multiplication, etc. This requires some discipline as to not get out of hand. “Here’s a really cool Unicode char. We could use the snowman to mean…”

Making Parallelism Easier
The data model in Fortress is based around a single shared global address space. The control model is to spawn a thread, with the hope that the average application developer will never actually do this. Libraries should use threads to to create stronger abstractions.

Steele noted that Fortress supports transactional access to shared variables by way of atomic blocks.

Fortress loops are parallel by default (well, actually, it’s the libraries). Fortress is very heavily based around generators as the sources of parallelism. Multiple executions of a body are driven by a generator. Reducers collect results. In Fortress, 1:n is a generator the generates numbers from 1 to n and assumes that these are independent. To print in order or something, use seq(1:n).

If the name Fortress reminds you of another language, this is not an accident. The stated goal of the Fortress language project is “to do for FORTRAN what Java did for C”. I’m not a Java programmer, but Fortress sounds like progress to me. The intent is to open source the project, and I can’t wait to take it for a test drive.


1 Response to “Fortress”

  1. 1 Interviews Guy Steele at mark++ Trackback on November 15, 2006 at 12:20 pm
Comments are currently closed.

%d bloggers like this: