fir-lang / fir

MIT License
23 stars 3 forks source link

Fir programming language

[Online interpreter] [Examples]

Fir is a programming language that aims to bring high-level programming with expressive types and typeclasses to the masses.

Some notable features are:

Goals

We want Fir to be a productive programming language when you need static types, with modern tooling (compiler, language server, documentation generator, formatter, build system, all in one executable), syntax, a batteries-included approach to the standard libraries, and an expressive type system.

Current status

Currently only a simple interpreter is available. The interpreter does not have a type checker yet, it ignores all types.

Development plan

We want to bootstrap Fir as quickly as possible.

To that end, only features that will help writing the bootstrapping compiler should be added to the interpreter, such as the type checker.

Features that are not absolutely needed to run the bootstrapping compiler will be left to the bootstrapped compiler. For example, the interpreter does not need to have a garbage collector.

Initially the compiler will only generate Wasm. In the long term we should have native backends as well.

Contributing

If the design and goals sound interesting, this is a great time to start contributing to Fir.

Currently we only have a simple interpreter that runs some simple programs, so the code is simple. If you are familiar with PL development than there should be nothing new or different.

Some important tasks to be able to implement the bootstrapping compiler: