Table of Contents
Fetching ...

The Fearless Journey [Draft]

Nick Webster, Marco Servetto, Michael Homer

TL;DR

Fearless Heart replaces fields with closures to form a minimal yet expressive object calculus suitable for both practical programming and language design. By adding reference capabilities, the authors extend Fearless to R-Fearless, enabling safe mutability and side effects while preserving equational reasoning, supported by a mechanised Redex model and a prototype compiler. The work formalises Fearless via well-formedness, reduction, and type systems, then extends it with RC/OC concepts (promotions, closure capture, and object capabilities) to show practical programming patterns like invariants, caching, and parallelism. Overall, the paper provides a principled, extensible foundation for building real-world systems and formal models within a lightweight object calculus.

Abstract

Existing minimal Object-Oriented models (OO), like Featherweight Java (FJ), are valuable for modelling programs and designing new programming languages and tools. However, their utility in developing real-world programs is limited. We introduce the 'Fearless Heart', a novel object calculus preserving FJ's minimal and extensible nature while being more suited for constructing complex, real-world applications. To illustrate the extensibility of the Fearless Heart, we extend it with Reference Capabilities (RC), creating R-Fearless. It supports mutability and other side effects while retaining the reasoning advantages of functional programming and gaining support for features that are well-known to be enabled by RC, like automatic parallelism, caching and invariants. R-Fearless is still minimal enough to allow further extensions. It is an ideal foundation for constructing both practical systems and formal models.

The Fearless Journey [Draft]

TL;DR

Fearless Heart replaces fields with closures to form a minimal yet expressive object calculus suitable for both practical programming and language design. By adding reference capabilities, the authors extend Fearless to R-Fearless, enabling safe mutability and side effects while preserving equational reasoning, supported by a mechanised Redex model and a prototype compiler. The work formalises Fearless via well-formedness, reduction, and type systems, then extends it with RC/OC concepts (promotions, closure capture, and object capabilities) to show practical programming patterns like invariants, caching, and parallelism. Overall, the paper provides a principled, extensible foundation for building real-world systems and formal models within a lightweight object calculus.

Abstract

Existing minimal Object-Oriented models (OO), like Featherweight Java (FJ), are valuable for modelling programs and designing new programming languages and tools. However, their utility in developing real-world programs is limited. We introduce the 'Fearless Heart', a novel object calculus preserving FJ's minimal and extensible nature while being more suited for constructing complex, real-world applications. To illustrate the extensibility of the Fearless Heart, we extend it with Reference Capabilities (RC), creating R-Fearless. It supports mutability and other side effects while retaining the reasoning advantages of functional programming and gaining support for features that are well-known to be enabled by RC, like automatic parallelism, caching and invariants. R-Fearless is still minimal enough to allow further extensions. It is an ideal foundation for constructing both practical systems and formal models.
Paper Structure (41 sections, 5 figures)

This paper contains 41 sections, 5 figures.

Figures (5)

  • Figure 1: The grammar of Fearless's functional core
  • Figure 2: The grammar of Fearless with reference capabilities
  • Figure 3: Relationships between capabilities in R-Fearless.
  • Figure 4: An example derivation from type-checking a Fearless Heart program with our PLT-Redex model.
  • Figure 5: An example reduction our Fearless Heart PLT-Redex model of a program that captures a variable in a container and then extracts it.