hook
hook copied to clipboard
The Hook Programming Language
The Hook Programming Language
Hook is an imperative, cross-platform, dynamically typed scripting language based on the mutable value semantics approach. It was written entirely by hand in C using easy-to-understand techniques like recursive descent parsing, stack-based virtual machine, and reference counting.
What does it look like
Hook has a modern C-like syntax. See:
fn factorial(n) {
if (n == 0)
return 1;
return n * factorial(n - 1);
}
Features
The main features are:
- Imperative
- Cross-platform
- Dynamically typed
- Mutable value semantics approach
- C-like syntax
- Value-captured closure
Warning: Hook is still in its early stages of development and is not production-ready.
Installing
For Linux (x64, arm64), and macOS (x64), use the following command to install Hook:
curl -sSL https://github.com/fabiosvm/hook-lang/releases/download/0.1.0/install.sh | sh
For Windows (x64), open a cmd prompt and use:
cd %tmp%
curl -sSLO https://github.com/fabiosvm/hook-lang/releases/download/0.1.0/install.bat
install
Building from the source code
If you prefer, follow the instructions in BUILDING.md to build Hook locally.
Hello, world!
It's possible to run our Hello, world!
directly from the command-line interface:
hook -e 'println("Hello, world!");'
Documentation
Sorry. The language undergoes constant changes, including in its lexemes and syntax. That's why there's no documentation.
Maybe the examples
folder will help.
License
Hook is released under MIT license. See LICENSE for more details.