println("'Hello, world' from Compose!");Compose is a functionally flavoured interpreted programming language with Rust-like syntax.
Features:
- Expression focused: blocks and control flow (
if,match, loops) are expressions and produce values. - Functions as first-class citizens
- High quality diagnostics
- Variables are immutable by default
- Garbage collection
- Portable: runs on any platform that supports rust
Compose is being developed as a hobby project and is not intended for production use.
For more thorough documentation about the language, embedding the language in your application, or using the CLI check out the docs.
If you want to try out Compose, the easiest way is to use the CLI.
The compose CLI lets you run Compose programs, explore them interactively, and inspect errors.
Install the latest version from GitHub using Cargo:
cargo install --git https://github.com/Dutch-Raptor/compose.gitAfter installation, the compose executable will be available on your PATH:
compose --versionCreate a new file called hello.cmps with the following contents:
println("Hello, from Compose!")and run it:
compose file hello.cmpsThis should print Hello, from Compose! to the console.
compose file hello.cmpscompose replLoad a file in the REPL:
compose repl --from prelude.cmpscompose explain E0003This gives examples, explanations, and suggested fixes.