📜 ⬆️ ⬇️

Machete - scripting environment for .Net

In an attempt to overcome my desire for perfection, I decided to open the source of my long-term project Machete for public viewing. Machete is my own ECMAScript 5 standard dialect or, as it is often called, JavaScript.

Main features

More understandable lambda expressions

var succinct = \(x, y) x + y; var verbose = function (x, y) { return x + y; }; 


Iteration support with 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 ch in "Strings are iterable!") { Output.write(ch); } 

Implementation



Machete is the product of several years of research, design and programming. I posted it on github, so please come in and fork the project. I would really like to increase the number of tests and tests from the community would be invaluable.
')
Repository Link: GitHub Repository For Machete

Source: https://habr.com/ru/post/125277/


All Articles