It supports functional, imperative, and object-oriented programming out-of-the-box. Other paradigms can be implemented as little embedded languages.
It uses runtime verification to enforce safety, but optimises away dynamic checks where the compiler can statically prove that a violation of the contract at runtime is impossible.
It supports compiler plugins, inline DSLs, and plugabble literals. Macros are plain AST-transforming functions that must be compiled prior to execution.
Getting this to work
Clone this repository:
$ git clone email@example.com:origamitower/purr.git
Install the tools (from the project's root):
$ cd purr $ npm install
Install the compiler dependencies (from the compiler's root):
$ cd purr/projects/compiler $ npm install $ dotnet restore src $ dotnet restore test
To build the compiler, run
To run the tests, run
If you're implementing a new feature, it might be useful to run the tests in "watch mode" (the project is recompiled and tests are run every time you change a source file). To do this, run
make test-watch-build in one terminal, and
make test-watch-run in another terminal.
Purr is (c) Quildreen Motta, and released under MIT.