Esta is a gradually typed, interpreted language and virtual machine implementation of my own design written in Rust
Interpreted: .est
source code is compiled into byte code (simple assembly instructions)
and run on the Esta VM.
Gradually Typed: The Esta Interpreter can infer variable type (e.g.):
var a: num = 4; // Explicitly declare a is an int
var c = a + b; // Since c and b have unknown types, they adopt a's type
Esta's syntax is an LR(1) grammar that takes most of it's ideas from the C-family of languages. It is most similar to JavaScript and Go. Here is an example snippet of code:
fun multiply(a, b) {
if a <= 0 {
return b;
} else {
return b + multiply(a - 1, b);
}
}
print(multiply(3, 4) == 12);
You are welcome to check the project out and try some of the demos provided.
WARNING: Please note that at it's current state, Esta is pre-alpha and is experiences radical, breaking changes daily.
git clone https://github.com/epellis/esta.git
cd esta
cargo build
RUST_LOG=esta=debug cargo run demos/hello.est
You can also measure performance by evaluating the Fibonacci Sequence using a naive recursive O(n^2) algorithm.
cargo bench
WIP: Installer coming soon
cargo run --release my_program.est