« Standard Deviation | Main | Quick bits of programming language news... »
January 24, 2007
Fortress
The researchers at SUN Labs have recently released a beta version of their new programming language, Fortress. It is available here under a BSD license. It is designed to tackle problems in the high performance computing arena and looks rather interesting.
The positives are:
The language is terse. There is very little boiler plate code needed to get up and running in Fortress. Hello world is:
export Executable run(args:String...) = print "Hello, World!\n"
-
Fortress is designed to have a syntax that resembles mathematical notation. For example, the absolute value function appears like this in Fortress:
|someVar|. This makes the code really brief and also partly familiar to mathematically inclined readers. Fortress is a good way along to achieving Fortran's original goal of formula translation. Operators are functions and can be defined for classes, overloaded, etc. In addition to normal operators, it is possible to define bracket operators, e.g., the absolute value operator shown above.
Multi-paradigm programming is supported, particularly for OO and functional styles.
There is strong support for parallel/multi-processor computing. I have not played with this, but the demos include a parallel matrix multiplication example that demonstrates this.
Fortress has support for comprehensions, similar to those in Python.
The negatives are:
The language is not fully implemented yet, so some features are not working, e.g., atomic modification of multiple variables is not fully implemented yet.
Libraries are extremely sparse at the moment. There isn't even a maths library yet.
Other interesting things:
Fortress targets the JVM initially. This means that there is a possibility of calling Fortress programs from Java programs via the interfaces defined by JSR 223.
Fortress makes extensive use of Unicode and this use isn't superficial: many of the mathematical operators and functions can be specified by the Unicode characters used to display them in mathematical papers. For example, the floor function on a variable x can be written as
⎣x⎦. In fact the Fortress compiler and interpreter deal exclusively with Unicode. While Fortress programs can be written completely in ASCII there is a conversion stage that translates ASCII longhand into equivalent Unicode characters before the lexer and parser get at the code.
Posted by JohnC at January 24, 2007 12:54 AM