In an attempt to overcome my perfectionism I’ve decided to open source my long term side project Machete for the world to see. Machete is my own dialect of the ECMAScript 5 standard or as it is more commonly called JavaScript.
Features
Cleaner lambda expressions:
var succinct = (x, y) x + y;
var verbose = function (x, y) { return x + y; };
First class iteration support with the foreach loop and generators.
var numbers = generator {
yield 1;
yield 2;
yield 3;
};
foreach (var n in numbers) {
Output.write(n);
}
foreach (var e in ["Array", " objects", " are", " iterable", "!"]) {
Output.write(e);
}
foreach (var c in "Strings are iterable!") {
Output.write(c);
}
Implementation
- The compiler is written in F# and uses the library FParsec.
- The runtime is written in C# and is hosted by .NET.
- It currently has over 400 tests with many more on the way.
Machete is the product of almost a years worth of research, design, and coding. I have it hosted on GitHub so please stop by and fork the project. I would really love to up my test count dramatically and test cases from the community would be invaluable. Without further ado, the link to my repository.