Hi
I always wanted to have a new language structure, I’m talking about an easier programming style, also I’m a JS developer so I started to add new features to JavaScript (like lots of new block headers) and I named this project Esy.
I like any feedback on this project, things you like and new ideas
In this language, you can write shorter codes and then compile them to JS (just like Less for CSS)
Full docs: https://github.com/Slye-team/esy-language/tree/master/docs
Example code:
// Cache sum for 500ms
cache 500 sum(a,b){
console.log('Computing...');
return a+b;
} key (c,d){
// We don't care about numbers order in sum function (a+b=b+a)
return [c, d].sort();
}
// Compute 5+7 once
console.log(sum(5,7))
// Load theme from cache without computing
console.log(sum(5,7))
console.log(sum(7,5))
// Wait 100ms more than cache's lifetime.
timeout 600{
// It should compute 5+7 again
console.log(sum(7,5))
}
Todo:
Source Map Generator
Upgrade build system
Upgrade node VM
Github Repo: https://github.com/Slye-team/esy-language
Please fork this project and contribute so we can have a great community