Erg has a strong type system. For example, it has dependent types and refinement types. These types strongly encode pre-conditions, invariant conditions, etc. into the code.
In addition to the readability of the syntax itself, Erg defines a rich set of methods and functions by default to improve code readability.
Erg is committed to providing error messages that are easy to read. Erg also provide multilingual support for error messages, etc.
- Functional & Object-Oriented
Incrementally improve your Python codebase
Erg code can be compiled into Python bytecode. This means you have zero-cost access to your Python assets with Erg. It is also easy to type and call Python APIs, like TypeScript.
- WIP Dyne (Python compatible bytecode interpreter, optimized to Erg's specifications, static types and the ownership system etc.)
- WIP LLVM (The compiler is called Gal, also optimized to Erg's specifications same as Dyne)
By Cargo (Rust package manager):
cargo install erg
By Source (Need to install the Rust toolchain):
git clone https://github.com/erg-lang/erg.git cd erg cargo build --release
And Erg supports building with Nix.
- You can change the language of the error message by using
--features japanese --features simplified_chinese --features traditional_chinese
- Debugging mode (for contributors)
- See here for more flags and abbreviations.