Mist (Mild Rust) is a simple programming language inspired by rust syntax and functional paradigm, written in Go using only Go’s standard libraries.
I wrote this while reading the Writing an Interpreter in Go, with tons of extra features (mentioned below).
This language has:
- Recursion
- Scopes and variable shadowing
- Currying
- Method-chaining
- Type system
- if, else if, else conditionals
- Binary Operators
- Annonymous functions
- Lists and Maps
- Functional-ish methods like mapand filter
- Builtin functions like max, len , print and range
- Precise error messages, pointing to the exact character/token that caused the error.
- Implicit returns
All of these features are demonstarted in the examples folder. The extension .rs is just for syntax highlighting. Disable LSP temporarily to avoid rust-related error messages.
One great thing about this language, is that it’s built using only the standard Go libraries. The only external dependency is for printing the AST in the terminal.
To get started:
-
Clone the repo
git clone https://github.com/MohamedAbdeen21/Mist-Lang.git
-
Install Go programming language
-
Install the dependencies
cd Mist-Lang && go mod tidy
To run a file
go run . examples/fibonacci.rs
Feel free to explore the examples for sample usages.
This project is licensed under the MIT License - see the LICENSE file for details.