Shed is self-hosting
Sunday 14 October 2012 21:09
As of 11 August 2012, the Shed programming language is self-hosting. That is, the compiler written in Shed could successfully compile itself, and also pass of its tests. So pleased was I at the time, I apparently forgot to note the date, so I had to go and look back at the commit logs to find the date that it happened.
Shed might be able to compile itself, but the implementation of the compiler isn't anywhere near finished. To be able to reach this point as quickly as sensible, I've implemented a fairly minimal subset of the language and the compiler. The next big step is to implement type-checking in the compiler, along with corresponding language features such as interfaces.
Since maintaining two separate compilers for the same language seems redundant, not to mention time-consuming and tedious, I've decided to deprecate the JavaScript compiler in favour of the Shed compiler. It also forces the Shed compiler to be of higher quality – I've already added line and character numbers to error messages, something that the JavaScript compiler had and I quickly came to miss. Trying to hunt down syntax errors given only the name of the file and the expected/actual token gets frustrating quickly.
The next couple of things to work on will probably be to add reference resolution, and to modify the parser to make new lines significant so that I can get rid of all those semicolons.
Topics: Shed