Steamroller was my University exam project in computer science targeting human computer interaction. The goal was to explore how the usability of programming could move forward by adopting new ways of working. I did implement a fully working native compiler on par with C++ in terms of performance, but I never released it because of certain limitations in its garbage collection strategy that didn't allow selecting heap allocated elements from function results.
I have been working on multiple prototypes for Steamroller 2.0, which could be adding reference counted types and data-driven programming, but none of them has felt ready for a first release. Releasing the first version of a programming language before reaching a final syntax was the mistake that almost killed Python with version incompatibility. Hopefully, I will eventually find a language definition without compromise worth releasing a first stable compiler for.
Read about what I discovered in my exam paper
Steamroller is a table-driven programming language and my exam project in computer science. The syntax is close to Basic and Matlab. It has functional purity levels close to the D programming language. Compilation is done to C99 or an assembler language for it's built in virtual machine that is used for debugging and scripted text editing.
The main feature is to extend enumerations into tables for code that is easier to read and safer to maintain.
Graphical programming is integrated to the IDE and modules are organized using a visibility graph for each project in the solution.
* Built-in table feature that extends the enumeration and replaces the switch statement.
* Graphical project overview makes it easy to prevent cyclic dependency.
* Each module has it's own namespace for private declarations.
* Built-in lists instead of template classes.
* Functional purity levels. (Similar to the D language)
* Fully safe function pointers without any runtime exceptions.
* Recursion is supported but loops are preferred.
In order to make the language easy to learn and maintain, the number of features has to be kept low. The language is called Steamroller because it is a flat and straight forward language.
In object orientation, you program by defining objects. With Steamroller, you split the classes into data and behaviour to make it compatible with functional programming. All data structures in Steamroller have their constructor, destructor and cloning generated automatically to avoid bloating the code like in C++. A key in a table can define a behaviour with a set of boolean flags and method pointers. Using multiple behaviours is a flexible alternative to multiple inheritance without the dangers of locking your whole class into the wrong hierarchy.
I decided not to include "for each" loops because the cost of refactoring is too high, the benefits are too small and I often have to change them back to regular for loops when I need to use the index or skip the last element. A smaller core language also lowers the learning threshold for beginners trying to understand existing code.
There is no nested scoping inside of methods in Steamroller, all local variables are allocated at the same time when the method begins. This prevents accidentally mixing up variables with the same name in the same function and makes it easier to see a variable's last value when debugging. The developer only has to think about a single scope per function.
Back to main page
© David Piuva