Log in Page Discussion History Go to the site toolbox

Armature programming language

From BluWiki

The Armature programming language is one that I'm working on in my spare time (part of the larger Rodin Framework). It's nowhere near complete, but it already incorporates some ideas that I think are interesting. Feel free to leave questions, comments or creative insults on the talk page, or edit this page yourself (but make sure you can spell)!


Armature's base concepts aren't entirely different from other programming languages: it has functions, objects, if/else blocks, etc. However, instead of classes, it uses the prototype system (like Self and JavaScript). Essentially, what this means is that there are no classes: objects are simply created using other objects as prototypes. Object creation and inheritance are about the same.

Also, Armature uses an entirely different syntax for object methods; instead of


Armature uses

method(object) args

While at first glance, this may seem confusing, it allows for a much more flexible way of programming, and avoids the fundamental failing of the other approach: methods and data are accessed in confusingly similar ways. In Armature, there is a clear difference between the two. Armature's syntax even allows you to define multimethods; they're just a logical extension of regular methods. For example:

collide(asteroid, spaceship) 60

Finally, Armature borrows a handy little feature from Python: indentation-based blocks. What this means is that instead of making (for instance) if statements like this:

if (condition) {
    do something...
    and something else...

do yet another thing...

you make them like this:

if condition:
    do something...
    and something else...
do yet another thing...

This approach better allows you to see and create the structure of your program, without excess baggage.

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2
This page was last modified on 22 October 2006, at 04:38.
Disclaimers - About BluWiki