The Blæst Programming Language


Blæst is a just-in-time and soon to be ahead of time compiled programming language. But you probably have read that on my GitHub or on any number of short descriptions, so I'm not going to explain that for the 100th time. If you want to read more about Blæst at a more surface level, check out the Blæst website.

So anyway, if you read that site, you should know Blæst was based off of the syntax of the Bell Labs B Programming Language. This language is the predecessor to modern day C, and shares a lot of it's syntax.


Example of Blæst's syntax

However, if you are a C programmer, or have been shown some guy's C source code (usually as some sort of a weird flex), you probably can spot some differences, and some of these differences are actually unique to Blæst. The first and probably most obvious is the import macro. This is functionally the same as the Objective-C import macro, so treat it the same as that.

Another thing that might jump out is the auto data type... except, its not a data type at all! Blæst is based off the same principle of B, that if variables a, b, and c exist, a[b] = c, b[a] = c, and *(a + b) = c. How is this possible? Well, everything in Blæst is word-aligned, based on the PC word (or Blæst word, which may differ on some systems). auto simply assigns one (or more) of these word blocks to a local variable. But why the name auto, well thats simple, B did it. The reason B did it however we completely agree with, auto does not refer to a datatype, but instead a lifetime. The variable x in this example will die as soon as it leaves the block it is defined in.

However the type of x has not been revealed. Now here's the shocking news, B language, and by extension Blæst has no typing system, or more specifically a single type, the PC word. This makes B language very ahead of its time, more similar to something like JavaScript or Lisp than C. This is why x is able to store a string which is later printed out, the use of a variable is completely determined by context.

So thats basically it, if any of this interested you, check out the Blæst development effort at blaest.org and maybe get involved with development.