Skip to content

Design Goals of Boba Language

Robert Kleffner edited this page Jun 17, 2022 · 1 revision

This document sets out a few key guiding principles for the Boba programming language.

1. Global Type Inference

Boba will not include higher-rank polymorphism, getting enough power from the first-rank fragment with complete type inference.

The overloading features complicate this picture, and provide a Turing-complete escape hatch for developers interested in type-level programming.

Boba will push the boundaries of what is possible within the type inference landscape, while trying to maintain reasonable error messages and easy to understand types.

2. Composable Abstractions

Boba will prefer not to use monads where possible, as their composability is complicated. The 'effects + handlers' system will be preferred in the vast majority of scenarios.

Boba will infer the maximal amount of polymorphism during type inference, to ensure the development of reusable functions. Boba will encourage the use of features such as overloading that constrain polymorphism, but do not reduce to a particular data type.

3. Small, Re-usable Code Components

Boba will prefer single-file libraries where possible.

4. Self-defined

As much as possible of the Boba type system and primitive semantics will be expressed in Boba, using standard declaration capabilities and the native escape hatch syntax where necessary.